excel nested 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 » Excel Nested If statements

Excel Nested If statements

resolvedResolved · High Priority · Version 2003

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

Excel Nested If statements

When entering a Nested IF statement, if you want 3 Ifs, what do you enter in the 'false' field? And how do you use the Name Box and is this important?

RE: Excel Nested If statements

Hello Stacy

Thank you for your question and welcome to the forum.

There always needs to be something in the value_if_false part of the IF function in order for it to work.

It depends how many options you want Excel to choose from as to how many IF functions you use - for example, if you use 3 IF statements, this would indicate that there are 4 possible outcomes Excel can enter in as your result. The last or fourth outcome would be entered into the value_if_false part of the function as this is the only possible outcome/option left after Excel has exhausted the first three.

The Name box is used to apply a name to a cell or cell range. It can be used to either (a) navigate to this particular cell or cell range; or (b) the name can be used in a formula in place of a cell reference or references, e.g. if you named the range A2:A4 as January, then you could have a formula in cell A5 that states =SUM(January) and it would be the same as putting in =SUM(A2:A4).

I hope this is helpful.

Kind regards
Amanda

RE: Excel Nested If statements

I cannot figure out what to put in the 'false' field so that I can get to my next If statement. I tried putting =if but that just gave me a response of =if.

RE: Excel Nested If statements

Hello Stacy

If you let me know what the formula needs to do, then I can provide further assistance if I'm able. If it would help to email a spreadsheet through to me, please email to amanda@stl-training.co.uk with an explanation of what the IF statement needs to do.

thanks
Amanda

RE: Excel Nested If statements

Due to confidentiality reasons I can't send through the spreadsheet but basically I have a column J which has a count of either 0, 1, 2, or 3. In column Q I want it to say Red if it is 3, Amber for 1 or 2 and Green if 0. Ia slo wanted to do this for column K to be expressed in column R.

RE: Excel Nested If statements

Hi Stacy

I think your formula would need to go as follows (in column Q - ? represents the number in the cell reference):

=IF(J?=3,"Red",IF(OR(J?=2,J?=1),"Amber","Green"))

Basically this is saying if there is a number 3 in the cell, enter the word Red. If there is a number 2 or 1 in the cell, enter the word Amber. The only other option is to enter the word Green assuming you only have the numbers 3, 2, 1 or 0 in column J.

Formula in column R would be the same except replacing references to column J with references to cells in column K.

Let me know how you get on.

Amanda

RE: Excel Nested If statements

Thank you Amanda that worked...it also taught me that I should sign up for a VB course!

 

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:

Quick Absolute Cell References

When entering cell references in a formula you probably click the cell, or you may type in the cell reference. If you require any of the 4 variations, press the F4 key now before you press Enter to toggle around the relative and absolute entries ($signs).

Note that the F4 key outside of editing a formula is the Repeat key to repeat a previous action.

View all Excel hints and tips


Server loaded in 0.08 secs.