ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional formatting with IF statements (https://www.excelbanter.com/excel-discussion-misc-queries/191115-conditional-formatting-if-statements.html)

Eric D

Conditional formatting with IF statements
 
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
--
Eric

Stefi

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

Regards,
Stefi

€žEric D€ť ezt Ă*rta:

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
--
Eric


Bob Phillips

Conditional formatting with IF statements
 
=ISNUMBER(MATCH(-D1,D:D,0))

--
HTH

Bob

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

"Eric D" wrote in message
...
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
--
Eric




Eric D

Conditional formatting with IF statements
 
Thanks Stefi, this works great but is there a way for it to not highlight
cells that are blank?
--
Eric


"Stefi" wrote:

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

Regards,
Stefi

€žEric D€ť ezt Ă*rta:

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
--
Eric


Bob Phillips

Conditional formatting with IF statements
 
=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)

"Eric D" wrote in message
...
Thanks Stefi, this works great but is there a way for it to not highlight
cells that are blank?
--
Eric


"Stefi" wrote:

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

Regards,
Stefi

"Eric D" ezt írta:

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
--
Eric




Stefi

Conditional formatting with IF statements
 
=AND(A1<0,NOT(ISERROR(MATCH(-A1,A:A,0))))
Stefi


€žEric D€ť ezt Ă*rta:

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


"Stefi" wrote:

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

Regards,
Stefi

€žEric D€ť ezt Ă*rta:

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
--
Eric


Eric D

Conditional formatting with IF statements
 
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?
--
Eric


"Bob Phillips" wrote:

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

--
HTH

Bob

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

"Eric D" wrote in message
...
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
--
Eric





Stefi

Conditional formatting with IF statements
 
Sorry, I forgot to change ref A to D:
=AND(D1<0,NOT(ISERROR(MATCH(-D1,D:D,0))))
Stefi

€žStefi€ť ezt Ă*rta:

=AND(A1<0,NOT(ISERROR(MATCH(-A1,A:A,0))))
Stefi


€žEric D€ť ezt Ă*rta:

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


"Stefi" wrote:

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

Regards,
Stefi

€žEric D€ť ezt Ă*rta:

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
--
Eric


Eric D

Conditional formatting with IF statements
 
Thanks you two this works wonderfully.
--
Eric


"Bob Phillips" wrote:

=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)

"Eric D" wrote in message
...
Thanks Stefi, this works great but is there a way for it to not highlight
cells that are blank?
--
Eric


"Stefi" wrote:

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

Regards,
Stefi

"Eric D" ezt Ă*rta:

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
--
Eric





lisa321

I'm so glad to have found this old post. It worked well for my application. Thanks so much


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com