Multiple If Statement

montanaaggie

Board Regular
Joined
Nov 11, 2005
Messages
122
Office Version
  1. 365
Platform
  1. Windows
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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi Dave,

Try this in E4:

=CHOOSE(MATCH(D4,{0,0.149,0.399,0.599,1.01},1),"CO2","Water","CO2","Water")
 
Upvote 0
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)
 
Upvote 0
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)
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,560
Messages
6,120,217
Members
448,951
Latest member
jennlynn

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