Lookup Last Not Empty Cell Header - Discounting blank cells with links to source

Occasional Contributor

Using the lookup formula (below) to pull down the header of the last not empty cell. The spreadsheet is linked to another so technically all the cells have formulas in them but not all display values. How do I set it so the formula pulls the header of the last not empty cell, ignoring the formulas/links to the source spreadsheet. I know I've done this in the past but don't remember how ... help!

 

=LOOKUP(2,1/(T173:V173<>0),T$1:V$1)

 

1 Reply
Do you mean the cells have formulas in them, but display blank ""? If you want to exclude both 0 and "", maybe you could try:

=LOOKUP(2,1/(T173:V173<>0)/(T173:V173<>""),T$1:V$1)