Conditional format, variable rows and columns

•Daniel•

New Member
Joined
Jun 5, 2009
Messages
44
Hello I have this formula for conditional formatting to highlight a row:

Code:
=AND(OR(COUNTIF($D$5:$F$8,$D5:$F5)>=2),$G5<>0)

If any of the values on the row is reapeatead in the range and another condition is true then highlight the row, the thing is I only know where the range begins, the end column and the end rows are variable, I can store them in variables but don't know how to put the columns variable in:

Code:
=AND(OR(COUNTIF($D$5:$[B]F[/B]$" & x & ",$D5:$[B]F[/B]5)>=2),$[B]G[/B]5<>0)

How can I put this "formula1:=" in r1c1 style?,

thx
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I made a named range (named LX) and use this:
=AND(OR(COUNTIF(INDIRECT("$D$5:$F$" & LX),$D5:$F5)>=2),$G5<>0)

A quick way to get the R1C1 version of a formula is to turn on the macro recorder, click in the cell to edit it, press return.
"=AND(OR(COUNTIF(INDIRECT(""$D$5:$F$"" & LX),R[4]C4:R[4]C6)>=2),R[4]C7<>0)"
 
Upvote 0
Solution

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top