conditional formating shadow to alternating

webdevptg

Board Regular
Joined
May 2, 2019
Messages
51
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. Web
Hi,

I need to apply shadow to alternating lines that are ordered by country.
I've made a series of attempts with the mod function and counting but nothing produces the effects I want.
Captur.JPG


Download example
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
with a hidden column:
Map1
B
21
Blad1
Cell Formulas
RangeFormula
B2B2=IF($A2=$A1,$B1,IF($B1=1,0,1))
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
For 365
+Fluff v2.xlsm
ABC
1CountyDistrictWard
2BuckinghamshireWycombeHambleden Valley
3CornwallCornwallSt Teath and St Breward
4County DurhamCounty DurhamStanley
5CumbriaEdenUllswater
6CumbriaEdenCrosby Ravensworth
7DerbyshireAmber ValleyAlport
8DerbyshireDerbyshire DalesBradwell
9DerbyshireHigh PeakPadfield
10DevonTorridgeWaldon
11DevonTeignbridgeTeign Valley
12DorsetNorth DorsetShaftesbury West
13GloucestershireCotswoldErmin
14Greater ManchesterStockportMarple South
15Greater ManchesterOldhamRoyton South
16Greater ManchesterOldhamSt Mary's
17Greater ManchesterOldhamShaw
18Greater ManchesterRochdaleNorden
19HerefordshireHerefordshire, County ofBishops Frome & Cradley
20LancashirePendleBoulsworth
21LancashirePendleOld Laund Booth
22LancashireBlackburn with DarwenShadsworth with Whitebirk
23North YorkshireHambletonOsmotherley & Swainby
24OxfordshireCherwellCropredy, Sibfords and Wroxton
25ShropshireShropshireCleobury Mortimer
26South YorkshireSheffieldRichmond
27StaffordshireStoke-on-TrentBirches Head and Central Forest Park
28StaffordshireStoke-on-TrentGreat Chell and Packmoor
29StaffordshireCannock ChaseRawnsley
30SurreyWaverleyHaslemere Critchmere and Shottermill
31West MidlandsBirminghamLongbridge
32West MidlandsBirminghamQuinton
33West YorkshireKirkleesKirkburton
34West YorkshireKirkleesColne Valley
35West YorkshireBradfordTong
36West YorkshireBradfordBowling and Barkerend
37West YorkshireBradfordCity
Main
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:C37Expression=MOD(COUNTA(UNIQUE(FILTER($A$1:$A2,$A$1:$A2<>""))),2)=0textNO
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

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