Conditional formatting with IF statements

  • Thread starter Thread starter Eric D
  • Start date Start date
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
 
Select column D and crate Conditional formatting with this formula:
=NOT(ISERROR(MATCH(-D1,D:D,0)))

Regards,
Stefi

„Eric D†ezt írta:
 
=ISNUMBER(MATCH(-D1,D:D,0))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Thanks Stefi, this works great but is there a way for it to not highlight
cells that are blank?
 
=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)
 
=AND(A1<>0,NOT(ISERROR(MATCH(-A1,A:A,0))))
Stefi


„Eric D†ezt írta:
 
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?
 
Sorry, I forgot to change ref A to D:
=AND(D1<>0,NOT(ISERROR(MATCH(-D1,D:D,0))))
Stefi

„Stefi†ezt írta:
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top