Multiple IF's

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have 7 codes that I need to convert to their corresponding value. I want to do this using IF, but felt nesting 7 of them is a bit excessive. I recall once getting a tip on how to put them all in one but can't seem to find it...unless I'm remembering wrong. It can be done can't it? I thought it would be a simpler formula than having IF in there 7 times. The criteria is as follows:
[TABLE="width: 405"]
<tbody>[TR]
[TD]=IF(CSV!AK3="E1",1.25)[/TD]
[/TR]
[TR]
[TD]=IF(CSV!AK3="V1","VAR")[/TD]
[/TR]
[TR]
[TD]=IF(CSV!AK3="L2.0","1.9375")[/TD]
[/TR]
[TR]
[TD]=IF(CSV!AK3="L2.5","2.4375")[/TD]
[/TR]
[TR]
[TD]=IF(CSV!AK3="L3.0","2.9375")[/TD]
[/TR]
[TR]
[TD]=IF(CSV!AK3="L3.5","3.4375")[/TD]
[/TR]
[TR]
[TD]=IF(CSV!AK3="L4.0","3.9375")

All help is always appreciated. I love learning this![/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
how about a lookup table like this?


Excel 2013/2016
ABCDE
1E11.25L2.52.4375
2V1VAR
3L2.01.9375
4L2.52.4375
5L3.02.9375
6L3.53.4375
7L4.03.9375
Sheet1
Cell Formulas
RangeFormula
E1=VLOOKUP(D1,$A$1:$B$7,2,0)
 
Upvote 0
You can also hard-code the reference table if you don't want to put it in the sheet:


Book1
AB
1E11.25
2V1VAR
3L2.01.9375
4L2.52.4375
5L3.02.9375
6L3.53.4375
7L4.03.9375
Sheet1
Cell Formulas
RangeFormula
B1=VLOOKUP($A1,{"E1",1.25;"V1","VAR";"L2.0",1.9375;"L2.5",2.4375;"L3.0",2.9375;"L3.5",3.4375;"L4.0",3.9375},2,FALSE)


WBD
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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