Last value in column

BuffaloGuy

New Member
Joined
Dec 5, 2017
Messages
42
Office Version
  1. 365
Platform
  1. Windows
I have a table on sheet "History" called Table 6, and a column in that table called Item #.

In cell B2 on sheet "Initial", I want to have the value of the last non-blank in the item # column.

currently I have =XLOOKUP(2,1/(Table6[@[Item '#]]<>0),Table6[@[Item '#]],"N/A",-1,-1)

it brings up the first value in the table
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try:
Excel Formula:
=XLOOKUP(TRUE,Table6[Item '#]<>"",Table6[Item '#],,,-1)
 
Upvote 0
an alternative

BigNum is a named value a very large number =9.99999999999999E+307

T202501a.xlsm
ABCD
1BBBBItem #
2a 213
3c 42
4x 5
5k 73
6AA
4b
Cell Formulas
RangeFormula
D2D2=LOOKUP(BigNum,Table6[Item '#])
 
Upvote 0
currently I have =XLOOKUP(2,1/(Table6[@[Item '#]]<>0),Table6[@[Item '#]],"N/A",-1,-1)
Don't you just need to take the @ signs out of that formula?
Excel Formula:
=XLOOKUP(2,1/(Table6[Item '#]<>0),Table6[Item '#],"N/A",-1,-1)

A couple of other options
Excel Formula:
=LET(d,Table6[Item '#],f,FILTER(d,d<>"","N/A"),INDEX(f,ROWS(f)))
Excel Formula:
=LET(d,Table6[Item '#],XLOOKUP("?*",d&"",d,"N/A",2,-1))
 
Upvote 0
Solution
Edit to my post. It is very early in the morning here.

I read value as a number. It is possible to use this approach with text but you have solutions.

Have a good day.
 
Upvote 0
Don't you just need to take the @ signs out of that formula?
Excel Formula:
=XLOOKUP(2,1/(Table6[Item '#]<>0),Table6[Item '#],"N/A",-1,-1)

A couple of other options
Excel Formula:
=LET(d,Table6[Item '#],f,FILTER(d,d<>"","N/A"),INDEX(f,ROWS(f)))
Excel Formula:
=LET(d,Table6[Item '#],XLOOKUP("?*",d&"",d,"N/A",2,-1))
All I had to do was take out the @ like you said. I had borrowed that formula from somewhere else and didn't realize they shouldnt have been there.

Thank you!
 
Upvote 0
You're welcome. Glad to help. Thanks for the follow-up.
As you can see, there are several ways of achieving the result. :)
 
Upvote 0
Don't you just need to take the @ signs out of that formula?
Excel Formula:
=XLOOKUP(2,1/(Table6[Item '#]<>0),Table6[Item '#],"N/A",-1,-1)

A couple of other options
Excel Formula:
=LET(d,Table6[Item '#],f,FILTER(d,d<>"","N/A"),INDEX(f,ROWS(f)))
Excel Formula:
=LET(d,Table6[Item '#],XLOOKUP("?*",d&"",d,"N/A",2,-1))

The previous answer worked, but not exactly for what I ended up needing in the next phase, but

=LET(d,Table6[Item '#],XLOOKUP("?*",d&"",d,"N/A",2,-1))

was exactly what i needed.
 
Upvote 0

Forum statistics

Threads
1,226,113
Messages
6,189,046
Members
453,522
Latest member
Seeker2025

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top