# If Statements

#### BrianK

##### New Member
I am trying to write a formula that contains 11 IF statements. Excel of course will only allow 7, how can I make this work. Any help would be greatly appreciated.

Thanks a lot

Brian

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
What do you actually want the formula to do?

As far as I know 7 is the limit for IF worksheet functions.

Perhaps there is another way to get the result you want.

I am creating a spreadsheet to give a food cost. When they build a cake they have 11 different ice cream choices to build the cake with and each ice cream of course is a different price. So I am building a food cost for each cake, and depending on what they select for the ice cream that is the price that I need to put into the food cost breakdown.

Now that I think about it there are 35 cake choices so in order to decide the food cost for a cake that is chosen, I will face the same problem here.

Hope that makes sense??

Brian-
I had a similar problem where there were more choices to be decided than if statements allowed. I wound up making a seperate table for my choices and then used a vlookup formula to match the item to the table. Look into the vlookup function. I now use it more than the if function.

Good luck- Andy

Here is an example with VLOOKUP:

Formula in C3:
=VLOOKUP(A3,\$E\$2:\$F\$7,2,0)+VLOOKUP(B3,\$H\$2:\$I\$10,2,0)
Book1
ABCDEFGHI
1CakeFlavorPriceIceCreamFlavorPrice
2CakeFlavorIceCreamFlavorPriceWhite\$12.00Vanilla3.99
3WhiteChocolate\$16.99Chocolate\$14.00Chocolate4.99
5YellowButterBrickle\$18.99Spice\$12.50FrenchVanilla6.99
7Orange\$10.00ButterBrickle6.99
8Pistachio2.99
9ChocolateChip4.99
10ChocolateChipMint4.99
11OrangeSherbet2.99
Sheet1

Replies
2
Views
198
Replies
3
Views
219
Replies
12
Views
272
Replies
12
Views
423
Replies
1
Views
233

1,207,438
Messages
6,078,561
Members
446,349
Latest member
Malroos7912

### 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.

### Which adblocker are you using?

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

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