# IF Formula Returns True or False, Not Desired Results

• Hi all i am trying to create a nested IF but i dont usually use worksheet functions, the formula i have will show either true or false but not the values i am trying to return.

Code
``=(IF(B3=11,"Sick",Sheet2!B2)=IF(C1="Line Off","",Sheet2!B2))``

Could someone help re-arrange it please and explain what i have done wrong? Regards,
Simon

• Re: Worksheet Function Nested If Shows True Or False?

Can't see what you are trying to do. You have two perfectly good formulas, each with an IF conditional action and an ELSE conditional action.

=If(B3=11,"Sick",Sheet2!B2)
=If(C1="Line Off","",Sheet2!B2)

How should one formula control the other?

Do you want

=If(B3=11,"Sick",If(C1="Line Off","",Sheet2!B2))

• Re: Worksheet Function Nested If Shows True Or False?

Quote from Simon Lloyd

Hi all i am trying to create a nested IF but i dont usually use worksheet functions, the formula i have will show either true or false but not the values i am trying to return.

Code
``=(IF(B3=11,"Sick",Sheet2!B2)=IF(C1="Line Off","",Sheet2!B2))``

Could someone help re-arrange it please and explain what i have done wrong? Regards,
Simon

Howdy. Your formula is in fact a TRUE or FALSE

= [COLOR="SeaGreen"]([/COLOR][COLOR="Blue"]IF(B3=11,"Sick",Sheet2!B2) [/COLOR]= [COLOR="Red"]IF(C1="Line Off","",Sheet2!B2)[/COLOR][COLOR="seagreen"])[/COLOR]

You have two individual components joined together with an "=" sign. And the outer parentheses do not fit in with the IF situation (They basically surround the result of the equation.)

Software: OpenOffice 3.0/NeoOffice 3.0 on Mac OS X 10.5.6
Humanware: Older than dirt

Old, slow, and confused - but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3.28.2008)

• Re: Worksheet Function Nested If Shows True Or False?

Quote from ByTheCringe

Do you want

=If(B3=11,"Sick",If(C1="Line Off","",Sheet2!B2))

which is exactly what i was trying to achieve!

Thansk very much both.

Regards,
Simon

• Re: Worksheet Function Nested If Shows True Or False?

Yep, knew it was already addressed. I just wanted to point out how the original was resulting in TRUE or FALSE.

Software: OpenOffice 3.0/NeoOffice 3.0 on Mac OS X 10.5.6
Humanware: Older than dirt

Old, slow, and confused - but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3.28.2008)

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!