if statements

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » If statements

If statements

resolvedResolved · Low Priority · Version 2003

Stacy has attended:
Excel Advanced course
Access Intermediate course
Access Advanced course

If statements

I am trying to enter a simple If statement whereby if cell L2 equals nm then I want the current cell (AQ) to say Red.
I am using the usual format that I use but I keep getting a name error. I was wondering if somone could help me and tell me what is wrong with my formula
=If(L2=nm, "red")

RE: If statements

Hello Stacy

Thank you for your question.

The IF function always needs three parts to work, therefore because this formula is missing the value_if_false part, the formula won't work.

As you don't want Excel to put anything in the cell if L2 doesn't equal nm, then use:

=If(L2=nm, "red","")

The double quotation marks "" tell Excel to leave the cell blank if L2 does not equal nm.

Kind regards
Amanda

Thu 5 Mar 2009: Automatically marked as resolved.

 

Training courses

 

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Using an equal (=) sign that isn't part of a formula

Before you type the equal sign, type an apostrophe: '
Then type your equal sign: = (and anything else you want to add after your equal sign)
Press ENTER.

(the apostraphe will disappear

View all Excel hints and tips


Server loaded in 0.08 secs.