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

nested if statements

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Nested IF Statements

Nested IF Statements

ResolvedVersion 2003

Angela has attended:
Excel VBA Intro Intermediate course

Nested IF Statements

I want to write a nested IF statement which gives an answer based on the 2 options.
For Example:
=IF(Inputs!F7=0,"n/a",Inputs!F7)
I want this to read if either Inputs! F7 or Inputs!F8 is = 0 then output should be 'N/a otherwise the value of either Inputs!F7 or Inputs!F8 should be the output.

thanks!!

RE: Nested IF Statements

Hi Angela

The nested IF statement you require needs an OR function to work.

The statement below checks if either of the Input cells = 0.and if either is 0 then it outputs "N/A", otherwise it outputs the larger of the 2 numbers.

=IF(OR(Inputs!F7 =0, Inputs!F8 =0),"N/A",IF(Inputs!F7 > Inputs!F8, Inputs!F7, Inputs!F8))

Just copy the above statement into the output cell.

Regards

Carlos

Excel tip:

Colouring cells containing formulas

Cells in a worksheet can contain values or they can contain formulas. You may wish to identify all the cells in your worksheet that contain formulas by colouring those cells.

Follow these steps:
1. Choose Edit > Go To menu, or press either F5 or Ctrl+G. Excel displays the Go To dialog box.
2. Click Special. Excel displays the Go To Special dialog box.
3. Select the Formulas radio button option.
4. Select OK.

At this point, every formula cell in the worksheet is selected, and those cells can be coloured formatted as desired.

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.11 secs.