I have a dates in Col D and want to lookup the value in Col F for todays date - 1 i.e. previous date
I have tried to set this up , but get an error
I have attached sample data
It would be appreciated if someone could kindly assist me
I have a dates in Col D and want to lookup the value in Col F for todays date - 1 i.e. previous date
I have tried to set this up , but get an error
I have attached sample data
It would be appreciated if someone could kindly assist me
1. First issue - the dates you have in the file are not just dates, but a date and time. Change them to just dates.
2. Formula in B1 can be either:
=INDEX(F2:F16,MATCH(TODAY()-1,D2:D16,0))
or
=VLOOKUP(TODAY()-1,$D$1:F21,3,FALSE)
If you want to keep same format for date-time, try:
Note: If yesterday was missing, the LOOKUP with returns the value of newest day from yesterday (nth day before yesterday)Please Login or Register to view this content.
Quang PT
Thanks for the help Guys. Formula works perfectly
The Range in Col D & F changes each day
I tried to record the code, and then to amend it so that it pick up the last row -1, but cannot get it to work
It would be appreciated if you could assist mePlease Login or Register to view this content.
You can extend the formula, like:
=INDEX(F2:F160000,MATCH(TODAY()-1,D2:D160000,0))
In fact, you could just do the whole column:
=INDEX(F:F,MATCH(TODAY()-1,D:D,0))
Thanks Greg. I now get #N/A
I have attached my sample data
Try an approximate match on TODAY():
=INDEX(F:F,MATCH(TODAY(),D:D,1))
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Thanks ALI
Formula works perfectly
People often forget about the approximate match setting.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks