Special Conditional Format

MasterOfDisaster

Board Regular
Joined
Dec 19, 2007
Messages
70
The title is not very descriptive, I realize. I need to highlight the whole row of a range based on its row number denoted in a given cell.

So for example, if my range is D5:K10 and the value in cell A1 is 3, I need to highlight the whole second row of the range (that is D7:K7). If A1 is 6 then range D10:K10 should be highlighted.

Either a conditional format or a macro solution would work, the preference is for the former.

Thanks in advance.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
if you use absolute addressing($A$1) instead of relative(A1) in your conditional formating, you should get the effect you desire.

HTH
Cal

Using your example, he is your condition.

=$A$1=3

Assuming you want to do multiple rows use this.
=$A1=3
 
Last edited:
Upvote 0
if you want highlight columns D to K, you would first click on D1(or your first conditional range cell), then highlight your entire table. Next set your conditional format as per my last example. Set you conditional highlight and press OK. Excel is smart enough to adjust the cell reference based on the highlighted area.

HTH
Cal
 
Upvote 0
Hi There

If the Row is important then you could try something like

=(ROW()-6)=$A$1

Given that you if A1 had 1 in it then row 7 would get highlighted ;)

HTH


Dave
 
Upvote 0

Forum statistics

Threads
1,214,572
Messages
6,120,306
Members
448,955
Latest member
Dreamz high

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