# Multiple If Statement

#### montanaaggie

##### Board Regular
I have a range of data in cells A1: C4
0% 15% CO2
15% 40% WATER
40% 60% CO2
60% 100% WATER

I then have a data point in D4 that is calculated based on a equation. I would like to have an equation in E4, that would look at the number in D4 and bring back its corresponding match in C4. Example 16% it would display Water, at 45% it would display CO2. I'm not exactly sure how to structure my IF statement to have this work.

Thanks,
Dave

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi Dave,

Try this in E4:

=CHOOSE(MATCH(D4,{0,0.149,0.399,0.599,1.01},1),"CO2","Water","CO2","Water")

Will this work for you?

Excel 2012
ABCDE
10%15%CO2
215%40%WATER
340%60%CO2
460%100%WATER16%WATER
Sheet1
Cell Formulas
RangeFormula
E4=LOOKUP(D4,A1:A4,C1:C4)

=vlookup(d1,\$a\$2:\$c\$4,3)

what are you expecting to see if the value is 15%, 40% or 60% exactly?

using your table based off the values in column A you could use somthing like

=LOOKUP(D4,A1:C4)

I think the easiest approach in E4 is =vlookup(D4,A1:C4,3,TRUE). The TRUE clause will return the closest match which seems to be what you want. Usually vlookup uses FALSE which returns a value only with an exact match.

Thanks for the help. I don't know why I didn't think about using a vlookup. That does seem to be the easiest method

It's not a "v"lookup;
"it is the lookup function.
Jim

It's not a "v"lookup;
"it is the lookup function.
Jim

Both lookup (as in Jim's formula ) and vlookup (as in formulas from myself and pam53154) will work. It's just matter of personal preference.

Replies
4
Views
714
Replies
1
Views
295
Replies
1
Views
291
Replies
2
Views
418
Replies
3
Views
263

1,221,005
Messages
6,157,342
Members
451,416
Latest member
mosteanuv

### 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.

### Which adblocker are you using?

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

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