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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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,215,674
Messages
6,126,144
Members
449,294
Latest member
Jitesh_Sharma

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