Forum Discussion
JohnG1948
Sep 09, 2023Copper Contributor
Retuning the value of a cell based on another cell found to have a given value
Hi Everyone This is my 1st post so forgive me if I'm not perfectly clear. I spent many years programming in many languages from assembler to C++ but this my 1st foray into Excel. It's turning out t...
HansVogelaar
Sep 09, 2023MVP
Will the dates in column A be sorted in ascending order?
Do you want to return the value of the first date <= given date that is found in column A, going from top to bottom,or the last date <= given date, or ...?
- JohnG1948Sep 09, 2023Copper ContributorThe dates will be in ascending order.
I do not want to return the date. I want to return the value in another column "A" has dates "C" has values I need- HansVogelaarSep 09, 2023MVP
Yes, I understood that, but you didn't answer my question.
Does this do what you want?
The formula in G2 is
=XLOOKUP(F2,A2:A10,C2:C10,"",-1)
- JohnG1948Sep 09, 2023Copper ContributorWorks perfectly!!
Thanks very much
John