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

if statements

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

Excel tip:

Entering text in Multiple Worksheets

If you have a number of worksheets in a workbook that require the same information (data or tables) on each worksheet, this can be done as follows:

Hold down the Ctrl key and click one or more of the additional worksheet tabs (i.e. Sheet2, Sheet3, etc).

In your mainsheet (Sheet1) enter the required data or design a table.

When done 'Click' on the other sheet tabs and you will see that the information entered in Sheet1 is on all the other selected worksheets.

NB Do not forget to deselect the worksheets - otherwise you may add data to the main worksheet and all the selected worksheets will also have that data!

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.