Writing a IF statement

Dell Gx110
March 2, 2009 at 14:04:51
Specs: Windows XP, 4GB
Am taking a class but cannot seem to get IF statement right. If cell C4 bronze= none, silver=3000, gold=5000 and platinum=10000. The statement I tried is =IF(C4,"Bronze","None",IF(C4,"Silver","3000",IF(C4,"Gold","5000",IF(C4,"Platinum","10000")))) comes up to many arguments. Please help!!!!

See More: Writing a IF statement

Report •

March 2, 2009 at 14:20:51
Hello there. I assume you are talking about an IF command in a program like Excel??

If you are, I have some questions for you.

First, are you trying to look for the names (bronze, silver, gold,etc) in the cells or are you trying to look for the numerical values in the cells?

Either way your code has errors as it does have too many arguments per line. For an IF statement you should have the following outline:

IF(logical_test, value_if_true, value_if_false)

These can be nested by substituting another IF statement in place of the "Value_if_true" and/or "Value_if_false" sections.

Let me know if you need more assistance.

Report •

March 2, 2009 at 15:01:22
For future reference, Excel questions belong in the Office Software forum.

Report •

March 2, 2009 at 15:14:45
Thanks for responding. Yes it is Excel and I am searching for the words bronze, silver, gold and platinum in cell C4. Each word has a corresponding value to be entered if found, Bronze=none, silver=3000, gold=5000 and platinum=10000. Yes I need more help. Thanks again.

Report •

Related Solutions

March 2, 2009 at 16:19:49
No Problem.

For the IF statements, you would need to do an actual logical test. The code that you wrote was almost correct, but you had "," between the cell(s) that you wanted to test and the value that you wanted to test for. This is why it was giving you the error. If we look at the first part of what you wrote, it was looking at testing cell C4, but it didn't know what to test cell C4 for. Then the next thing it saw was "bronze" for the "Value_if_true" section, and "None" for the "Value_if_false" section. If you had stopped here, the formula would have returned a "#VALUE!" error. This is due to not having a valid logical test.

To fix the code in this example, you would use

=IF(C4="Bronze","None", IF(C4="Silver", 3000, IF(C4="Gold", 5000, IF(C4="Platinum", 10000, "Error"))))

Note that I included the "error" entry in there as you need something to ensure that if none of test result in a "true" outcome, that the formula does not throw an actual error.

Please let me know if you need more explanation. I hope I have helped you with your class. :)

Funny as I am teaching an Excel class tomorrow. :)

MOS Master Certified
MCP Certified
CCNA Certificate Pending
A+ Certificate Pending

"I have gone to find myself. If I get back before I return, please tell myself to wait." :

Report •

Ask Question