IF Statement is too long

swhitesides

New Member
Joined
Apr 17, 2009
Messages
16
Hello everyone... I am in much need of help if anyone knows how I can make this work...

Here is my situation:

I have a drop-down list of 20 values, depending upon which value is chosen a different formula will need to be performed.

Ex: Drop down list is Dog,Cat,Mouse,Bird,...,Horse
Cat is chosen, then cell returns in B3*C3
Mouse is chosen, then cell returns B4*C4
...it will have 20 different 'if,then' statements pretty much

I hope that makes sense.

I tried an IF statement, but it came out WAY too long, although an IF statement seems to be the only thing to come out with the correct result. Any help would be GREATLY APPRECIATED!!

Thanks in advance!!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hello swhitesides, welcome to MrExcel

You can use a formula like

=CHOOSE(MATCH(A1,list,0),calc1,calc2......,calc20)

where A1 contains the dropdown, list is the list of 20 items and calcs are your B3*C3 etc.

If your B3*C3 etc. progresses one row at a time like your example then you can probably use a shorter formula like

=INDEX(B3:B22,MATCH(A1,list,0))*INDEX(C3:C22,MATCH(A1,list,0))
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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