Alternative to multiple IF statements

CaptainGravyBum

New Member
Joined
Dec 1, 2023
Messages
46
Office Version
  1. 365
Platform
  1. Windows
Hello,
I have a spreadsheet where I have been using multiple if statements to return a value in one of the columns. The problem is that the data I'm using has changed somewhat, so now there are around 50 different results to query.
As an example: =IF('Sheet1'!G2="1D","ND",IF('Sheet1'!G2="2D","EC",IF('Sheet1'!G2="3D","EC"))) and it goes on.
This is only three IF's but it's getting to be a bit silly now I have to go up to 50 of these (I'm not even sure if there's a limit).
I'm willing to accept this is probably the worst way to get the information I need.
Any suggestions welcome.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You can do this with a lookup function. Put a reference table in an unused portion of your workbook. In one column put your lookup values, and the other column your values to return. There are other ways as well. I'm sure folks will post their methods also.
 
Upvote 0
Solution
You can do this with a lookup function. Put a reference table in an unused portion of your workbook. In one column put your lookup values, and the other column your values to return. There are other ways as well. I'm sure folks will post their methods also.
Hi @awoohaw,
This answer was staring me in the face and I couldn't see it, I've been looking at this problem too long.
Thanks for your help.
 
Upvote 0
Stepping away or asking for another person's viewpoint is how many problems are solved. It happens to me frequently.
Happy to help.

Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,215,103
Messages
6,123,112
Members
449,096
Latest member
provoking

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