Conditional formatting to show two greys, but when group changes

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,197
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
I've been trying to do this all weekend but cant get it right?

In Column A I have book names
In column B I have the chapters
using conditional formatting,
I'd like to create a striped backgrounds of greys light and darker for each different book name.
so i can see the separation of the books easier
if possible?

please help if you can

thanks
Tony
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I think we need to know more about your data (posting an example of it would be helpful).
Is column A filled in for every row, so that the book name keeps repeating?
Or does a book name exist in column A, then there are a bunch of blank rows going down column A until the next book name appears?
 
Upvote 0
If your have "gaps" in column A between books, and if you wanted to do an alternating patter (of white and gray), you can select rows 1 down to the end of your data, and enter this Conditional Formatting formula:
Excel Formula:
=ISODD(COUNTA($A$1:$A1))
and choose a gray fill color.

If you wanted the other color to be something other than white, then add a second CF condition, following the exact same process, but use this as the other formula:
Excel Formula:
=ISEVEN(COUNTA($A$1:$A1))
and choose some other color.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,528
Messages
6,125,338
Members
449,218
Latest member
Excel Master

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