Sep 05 2023 01:56 PM - edited Sep 05 2023 02:03 PM
I can get the last column with any data in a row using this formula as described here
=LOOKUP(2,1/(1:1<>""),1:1)
How can I get the index of this column?
My sheet looks similar to this one (so I have values to the left and right of the cell containing the result)
Sep 05 2023 02:34 PM
For me it would be
= BYROW(numbers,
LAMBDA(row,
XMATCH(TRUE, ISNUMBER(row), , -1)
)
)
but that would require 365. Note: the index returned is relative to the array 'numbers' and not to the sheet.
Sep 06 2023 12:10 PM
If under the index you mean column number, as variant that could be
=LOOKUP(1E+307,COLUMN(1:1)*IF(1:1="","",1))
entered as array formula (Ctrl+Shift+Enter) on other than 365 or 2021 Excel.