Forum Discussion

Yasineyra's avatar
Yasineyra
Copper Contributor
Nov 12, 2024

XLOOKUP last non-empty cell in a table column

Hi all,

This is my first time posting here. 

I'm trying to return the last non-empty value of a specific column of a table to another sheet but it keeps returning the error "This formula is missing a range reference or a defined name."

The function I'm trying to use is:

=XLOOKUP(TRUE,TblData[Running Total]<>"",TblData[Running Total],,,-1)

where TblData[Running Total] is a column in the Table "TblData" on a separate sheet, "DATA". 

It works on the same sheet as the table so I'm wondering if it's something to do with specifying the sheet somehow?

 

Any help would be greatly appreciated.

 

 

1 Reply

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    It works for me.

    Alternatively:

    =LOOKUP(9^99,TblData[Running Total])
    
    =INDEX(TblData[Running Total],COUNT(TblData[Running Total]))

     

Resources