Nested If - use lookup instead?

hedgie

Board Regular
Joined
Jun 23, 2004
Messages
174
Office Version
  1. 365
Platform
  1. Windows
I can't seem to find this in the archives.

I have a complicated Nested If statement that basically says the following:

=if(a1="Multiply", b1*d1,if(a1="divide", b1/e1, if(a1="add", b1+f1,b1),c1),0),0)

As the spreadsheet grows, the nesting is growing too. I would like to make a database table which would have the ability to add conditions.

Multiply column 2 * column 4
Divide Column 2 / column 5 etc...


thsi way I can use a simple vlookup and then have a formula applied. Is there a way of using Index and match to accomplish this?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Oaktree said:
Aladin:

Is EVAL part of an add-in?

Yes, part of the morefunc.xll add-in. There is also a UDF in VBA by Charles (FastExcel, that is) in some thread on this site you can use.
 
Upvote 0

Forum statistics

Threads
1,216,127
Messages
6,129,022
Members
449,481
Latest member
joaotcosta23

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