Highlight Rows (Alternating Colors) Based on Cell Value

UzieJacuzzi

New Member
Joined
Jul 17, 2012
Messages
8
All, I have values in Column H in a file that could be big or large (so the # of rows is unpredictable)

Data could be something like:

1
2
2
3
4
4
4
4
5
5
6

I'd like to do the following:
  • Highlight all consecutive duplicates as one color, and extend highlight to the entire row, not just that cell
  • Using the above example, When switching from 2 to 3, the color should change.
  • It could be white and gray, It doesnt matter.
  • Note: I would like the cell fill to be white/gray, not the text color.

Thanks in advance! I am not sure if conditional formatting can be used for this or if I can use a macro instead...
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
If your data is in the range A1:A11 you can use the following conditional formatting formula:

=MOD(ROUNDUP(SUM(1/COUNTIF($A$1:$A$11,$A$1:$A1)),0),2)=0
 
Upvote 0

Forum statistics

Threads
1,214,518
Messages
6,119,996
Members
448,935
Latest member
ijat

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