Forum Discussion
KStecyk
Sep 29, 2020Brass Contributor
How to Reference the Last Cell in a Column in a Table?
I have a table where I add data at the end of every day. I would like a formula to reference the last value in a column. Is there an easy way to do that? In the photos above, I would lik...
- Sep 29, 2020Thank you for your reply. I looked at your and JMB17's reply to create me own.
Initially, I mentioned about the count. I did not want to have to manually keep track of the count, but I can use the count function to help me.
I am not sure how to show code, but my formula is as follows:
` =INDEX(KeyTable[KeyThree], COUNT(KeyTable[KeyThree]))
It's really just a hybrid of the two prior ideas.
Thank you for helping me with this small problem.
PeterBartholomew1
Sep 29, 2020Silver Contributor
Like the INDEX/MATCH this will return a single-cell range reference
= LET(
field, KeyTable[KeyThree],
XLOOKUP(1, SIGN(field), field,,,-1) )
The LOOKUP formula would do fine to return the value.
- KStecykSep 29, 2020Brass Contributor
Thank you, Peter, for your response. While I am confident that your solution works mighty fine, it looks complicated to me. I am okay with the Let function, but the XLOOKUP with all the different arguments seems complicated. Even so, it is good to see different alternatives. Sometimes, though, it is good to do things differently. So I appreciate your help.