Forum Discussion
Lycias
Jul 12, 2023Brass Contributor
Excel look up values and select most recent year
Good day, I want a formula that look-up an indicator in could D, for a specific age group in column F for a specific country using the country ISO code in column H, then retrieves the most recent va...
- Jul 12, 2023
See the attached version.
HansVogelaar
Jul 12, 2023MVP
The formula is a bit more complicated since all values in your sample worksheet are text.
See the attached version.
Lycias
Jul 12, 2023Brass Contributor
Thanks, Hans. Is it possible to have this as one formula that I can use in a column in another sheet to pull this value? I just want the data value in one column for all countries?
- HansVogelaarJul 12, 2023MVP
See the attached version.
- LyciasJul 13, 2023Brass ContributorHi Hans, I noticed that the formula is not giving me the data value for the most recent year. it seems like it is giving the data value for the first appearance of the Subgroup_val (column F). Is there any modification I can do so that the data value given is for the most recent year from column J?
- HansVogelaarJul 13, 2023MVP
The formula should do what you want. Take this example from the Dummydata sheet:
The most recent year for Antiretroviral therapy, Total, GTM is 2019, and the corresponding data value is 18.4
Here is the result of the formula:
- LyciasJul 12, 2023Brass ContributorThanks a lot, Hans. This works perfectly fine.