I have Data table with Name, dob, gender, relation and age as per attachment. I also Have Table of Age Band
I want to Formula or code insert age band in Column F as per age in Column E.
e.g. cell E2 is 60 hence it fall under age band of 56-60
I have Data table with Name, dob, gender, relation and age as per attachment. I also Have Table of Age Band
I want to Formula or code insert age band in Column F as per age in Column E.
e.g. cell E2 is 60 hence it fall under age band of 56-60
In F2, copied down:
=VLOOKUP(E2,$H$2:$J$15,3,1)
Last edited by AliGW; 08-12-2016 at 04:40 AM.
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.
Excellent.
I know Basic vlookup.
Can you please explain me your code. How it works? Just for my knowledge.
Glad to help!
=VLOOKUP(E2,$H$2:$J$15,3,1)
If you know basic VLOOKUP rules, then you will know that the formula is doing this:
1. Comparing the value in E2 with the values in H2 to H15 and finding the best match (bigger or equal to E2).
2. Taking the value from J2 to J15 that corresponds to the match in H and returning it as the answer.
=VLOOKUP(lookup_value,lookup_array,column_in_array_with_return_value,approximate_match)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks