Conditional formatting with IF statements

E

Eric D

Is there a way that I can use conditional formatting with an IF statement?

What I want to happen is, if in column D there appears a number that has an
opposite match (i.e. 500 and -500) that it highlights those. Is this
possible and if so, how?

Thanks
 
S

Stefi

Select column D and crate Conditional formatting with this formula:
=NOT(ISERROR(MATCH(-D1,D:D,0)))

Regards,
Stefi

„Eric D†ezt írta:
 
B

Bob Phillips

=ISNUMBER(MATCH(-D1,D:D,0))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
E

Eric D

Thanks Stefi, this works great but is there a way for it to not highlight
cells that are blank?
 
B

Bob Phillips

=AND(D1<>"",ISNUMBER(MATCH(-D1,D:D,0)))


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
E

Eric D

Thanks Bob, is there anyway I can get it to ignore blank cells?
right now if a cell is blank it thinks its value is 0, so is there a way to
get it to not color cells that are left blank?
 
S

Stefi

Sorry, I forgot to change ref A to D:
=AND(D1<>0,NOT(ISERROR(MATCH(-D1,D:D,0))))
Stefi

„Stefi†ezt írta:
 
E

Eric D

Thanks you two this works wonderfully.
--
Eric


Bob Phillips said:
=AND(D1<>"",ISNUMBER(MATCH(-D1,D:D,0)))


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Top