Return last value in a row, based on another cell value on another sheet

Viewed 44

anyone know a simple trick to automatically get the last value of the row in total assets on the first row each time ? I'd also lie to use the same trick for total liabilities later.

screenshot of what total assets looks like:

enter image description here

screenshot of other sheet:

enter image description here

I'm trying to get the value based on the value within the first column "Total Assets" on another sheet.

1 Answers

Not sure if there is an easier way but you could do:

enter image description here

Formula in cell K4 is:

=VLOOKUP($A$2;2:2;LOOKUP(2;1/(1:1<>"");COLUMN(1:1));FALSE)

All credits to: Get value of last non-empty cell

Actually, if we add extra columns, the formula updates correctly:

enter image description here

NOTE: This formula works because headers row (row 1) holds just the headers. If there is any other cell with data outside this dataset, it won't work properly. Something like below would calculate the wrong output:

enter image description here

Related