Forum Discussion
urb1985
Aug 03, 2023Copper Contributor
Formula and function
I am looknig for a formula where only the date change can pick the correspondant figure from the table for a particular material at a particular cell. example below; PRODUCT NAME 5/14/2023 P...
- Aug 03, 2023
bosinander
Aug 03, 2023Iron Contributor
urb1985
Row4: B2 has the day number (14) subtracted to find the same figure as the month.
Months may be formatted as in your example to not show the day (-01 with my local settings).
=LET(months, $E$1:$O$1,
figures, E2:O2,
lookupDate, $B$1,
lookupMonth, lookupDate-DAY(lookupDate)+1,
output, XLOOKUP(lookupMonth,months,figures),
output
)If older Excel, it can be done using hlookup.
- urb1985Aug 03, 2023Copper ContributorThank you Bosinander for your help however unfortunately the provided formulas not working in my office, i am using Microsoft office 2013, can you drive formula for that version? many thanks.
- HansVogelaarAug 03, 2023MVP
- urb1985Aug 03, 2023Copper ContributorThis is working perfectly!
Really Thankful.