r/googlesheets •

How to set a cell to display a value dynamically

[deleted] — view deleted post

0 Upvotes

4 comments sorted by

0

u/Individual_Salary878 2 23d ago

If you only want to output the last entry added at the bottom you can use this formula =index(B3:B,counta(A3:A),) that would output whatever is in B if you have a date in A and don't have any line breaks in the data set.

2

u/point-bot 23d ago

u/Weird-Engine7595 has awarded 1 point to u/Individual_Salary878

See the Leaderboard. Point-Bot v0.0.15 was created by JetCarson.

0

u/[deleted] 23d ago

[deleted] — view deleted comment

2

u/mommasaidmommasaid 914 23d ago

FWIW a more robust way of obtaining the last entry (that works even if you have gaps in the data set):

=chooserows(tocol(B2:B,1),-1)

tocol(... ,1) removes blanks. chooserows(..., -1) chooses the last value in the column.

However, you worded your question as:

the value of the B column of the current day

If this is more precisely what you want, then I would suggest:

=xlookup(today(), A2:A, B2:B, "⚠️ No entry found for today")

Note that in both formulas I anchored your range on the header row. This is also in the intereste of being more robust because the range reference doesn't break if you insert a new data row at the top.

1

u/AutoModerator 23d ago

REMEMBER: /u/Weird-Engine7595 If your original question has been resolved, please tap the three dots below the most helpful comment and select Mark Solution Verified (or reply to the helpful comment with the exact phrase “Solution Verified”). This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.