IF formula not working

l_heaith

New Member
Joined
Aug 30, 2017
Messages
5
I saw where you can have up to 64 nested formulas. I only have 15 and am getting an error. I'm pretty sure I did it correctly. Formula as follows:
=IF(C1="Abbott","2.75",IF(C1="Calabrio","2.75",IF(C1="Cellcom Repair","2.75",IF(C1="Cellcom Retail","2.75",IF(C1="Cellcom Service","2.75",IF(C1="Marvin","2.75",IF(C1="NCSS","2.75,IF(C1="USAA","2.75",IF(C1="Banking","3.00",IF(C1="Cellcom PO","3.00",IF(C1="Centra","3.00",IF(C1="HD Supply","3.00",IF(C1="HDS Order","3.00",IF(C1="CS PO","3.50",IF(C1="Ryder","4.00")))))))))))))))

I'm using Excel 2010. Any reason this isn't working? Thanks for any help!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try this:
you forgot a " after IF(C1="NCSS","2.75",
ABCDEFG
1AbbottDescVal
2Abbott2.75
3If2.75Calabrio2.75
4Match2.75Cellcom Repair2.75
5Ceelcom retail2.75
6Cellcom Service2.75
7Marvin2.75
8USAA2.75
9Banking3
10Cellcom PO3
11Centra3
12HD Supply3
13HDS Order3
14CS PO3.5
15Ryder4

<colgroup><col style="width: 25pxpx" https:="" www.mrexcel.com="" forum="" usertag.php?do="list&action=hash&hash=F7E9D0"" target="_blank"></colgroup><colgroup><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
★ l_heaith

Worksheet Formulas
CellFormula
B3=IF(C1="Abbott","2.75",IF(C1="Calabrio","2.75",IF(C1="Cellcom Repair","2.75",IF(C1="Cellcom Retail","2.75",IF(C1="Cellcom Service","2.75",IF(C1="Marvin","2.75",IF(C1="NCSS","2.75",IF(C1="USAA","2.75",IF(C1="Banking","3.00",IF(C1="Cellcom PO","3.00",IF(C1="Centra","3.00",IF(C1="HD Supply","3.00",IF(C1="HDS Order","3.00",IF(C1="CS PO","3.50",IF(C1="Ryder","4.00")))))))))))))))
B4=INDEX(Table2[Val],MATCH(C1,Table2[Desc],0))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0
Remove the double-quotes around numbers if your intent is to use them as numeric values. For example, change "2.75" to 2.75.

With cyrilbrd's design, it is not necessary to use a table object and INDEX/MATCH.

Aside.... I avoid table objects because Excel imposes restrictions on their use, IIRC.


It is sufficient to write:

=VLOOKUP(C1, $F$2:$G$15, 2)

That presumes that C1 matches one of the strings in F2:F15.

Your original IF() formula returns FALSE if it does not. That is usually undesirable. But it was not clear if you merely overdesigned the IF() formula, or if you overlooked returning a meaningful value when C1 does not match any of the strings.

If the latter, use the following formula:

=IFERROR(VLOOKUP(C1, $F$2:$G$15, 2), "whatever you want")


That works for Excel 2007 and later; that is, Excel files that are not saved as "xls".
 
Upvote 0
Try this:
you forgot a " after IF(C1="NCSS","2.75",
ABCDEFG
1AbbottDescVal
2Abbott2.75
3If2.75Calabrio2.75
4Match2.75Cellcom Repair2.75
5Ceelcom retail2.75
6Cellcom Service2.75
7Marvin2.75
8USAA2.75
9Banking3
10Cellcom PO3
11Centra3
12HD Supply3
13HDS Order3
14CS PO3.5
15Ryder4

<tbody>
</tbody>
★ l_heaith

Worksheet Formulas
CellFormula
B3=IF(C1="Abbott","2.75",IF(C1="Calabrio","2.75",IF(C1="Cellcom Repair","2.75",IF(C1="Cellcom Retail","2.75",IF(C1="Cellcom Service","2.75",IF(C1="Marvin","2.75",IF(C1="NCSS","2.75",IF(C1="USAA","2.75",IF(C1="Banking","3.00",IF(C1="Cellcom PO","3.00",IF(C1="Centra","3.00",IF(C1="HD Supply","3.00",IF(C1="HDS Order","3.00",IF(C1="CS PO","3.50",IF(C1="Ryder","4.00")))))))))))))))
B4=INDEX(Table2[Val],MATCH(C1,Table2[Desc],0))

<tbody>
</tbody>

<tbody>
</tbody>
Thank you. Didn't see that I forgot a ". Will give that a try.
 
Upvote 0
Thank you. I tried to do it that way to so I wouldn't have to write it all out but got an error message but will try this again! Thank you!
 
Upvote 0
I also forgot one crucial piece of info. I've been trying to write it and it's not working out so I don't know if it's possible in Excel. I'm trying to write if L2 is true then vlookup(C1, $F$2:$G$15, 2) if that makes sense. Thank you!
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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