If cell contains (certain numerical value) then return (corresponding numerical value)

MidwestDrummer

New Member
Joined
Sep 19, 2017
Messages
5
Below is a screen shot of my RMD calulator that I use frequently at work. I would like to be able to key in a person's age in B3, and then have the corresponding RMD factor automatically populate in B4. For example, if I key in "74" into B3, I would like to have "23.8" automatically populate in B4. I attempting the following:

=LOOKUP(B3, {"70","71","72"}, {"27.4","26.5","25.6"})

However, as you can see in the screen shot, I'm not having any luck. I've found that if I replace the numerical ages with words (such as vegetables and also replace the numerical RMD factors with words (such as each vegetables corresponding color), then the formula works. However, when I replace the words with numbers, that seems to break it. Any idea how I might go about this?

PC2dINC.png
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Welcome to the Board!

Note that double-quotes indicates Text. If you are dealing with numbers, get rid of them, i.e.
Code:
=LOOKUP(B3, {70,71,72}, {27.4,26.5,25.6})
 
Upvote 0
You are welcome!

If you have a large list, you may want to also consider setting up a lookup table and using a VLOOKUP formula.
One advantage to that is if you ever need to add or change values, you only have to do it in one place, and do not need to update all your formulas.
 
Upvote 0
You are welcome!

If you have a large list, you may want to also consider setting up a lookup table and using a VLOOKUP formula.
One advantage to that is if you ever need to add or change values, you only have to do it in one place, and do not need to update all your formulas.

I added my list to the Excel file. What formula would be to most efficient for keying in the age into B3, and having the agent automatically populate in B4 from the list in the bottom portion of my screen shot?

ELdnwVb.png
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top