Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Nested If Statements

Status
Not open for further replies.

maccten2000

Programmer
May 13, 2003
37
EU
Hi All,

I have an excel worksheet that i want to colour code cells based on the values in them.

So lets take cells A1 & B1 as examples. Effectively what i want to say is

If value in A1 is 0
AND the value in B1 contains a value
AND this value is a number
Conditional Format it Yellow

Can anyone help me out. Its the Third instance of the and that has me slightly confused

Cheers
 
Hi,
[tt]
If value in A1 is 0
AND B1 contains a NUMBER

Formula is: =AND($A1=0,ISNUMBER($B1))
[/tt]

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Skip,


Thanks for the prompt reply. However it is possible for A1 to have a value other than a number which is why i need to get the three conditions into the nested If statement

If i wasnt using conditional formating The formula would be something like below.

=IF(AND(isnumber(A2)>0,AND(B2=0,A2>0)), "Yes", "No")

Cheers
 

If value in A1 is 0
AND the value in B1 contains a value
AND this value is a number

However it is possible for A1 to have a value other than a number which is why i need to get the three conditions into the nested If statement
That's NOT what you originally asked!

Please state your requirement, CLEARLY, CONCISELY and COMPLETELY!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Yup, Terribly sorry about that, It only came up after an additional request
 


Just drop the IF statement.

Use the expression instead.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top