I've been looking for a custom function for Google Sheets which finds the last row which has data.
I wanted to be able to give a range and find the last row with data, as well as being able to specify which column(s) it would give as output.
For example, searching the range A:A for its last row with an entry, and returning the same row from C:D. In this case it would result in [["cool","beans"]] as the output.
+---+--------+------+-------+------+
|   | A      | B    | C     | D    |
+---+--------+------+-------+------+
| 1 | Words  |      | Then  |      |
+---+--------+------+-------+------+
| 2 | and    | asd  | a     |      |
+---+--------+------+-------+------+
| 3 | things |      | thing | Yep  |
+---+--------+------+-------+------+
| 4 |        | here |       | Why? |
+---+--------+------+-------+------+
| 5 | stuff  |      | cool  | beans|
+---+--------+------+-------+------+
| 6 |        |      |       |      |
+---+--------+------+-------+------+
I found a few solutions, but some only allowed checking a single column, didn't handle gaps well or required the use of quotation marks, meaning formula drag and drop functionality was lost. Or using a very long combination of functions, such as this.
I decided to make my own custom formula and you can view my solution below.
