Conditional Formatting

Jstump

New Member
Joined
Oct 25, 2023
Messages
36
Office Version
  1. 365
Platform
  1. Windows
How would i get this sheet to alternate rows between2 different cell style but link it to where it does not apply if there is no data the column A? the sheet can be anywhere between 2 rows or 4000.

Kane 1.xlsx
ABCDEF
1PIER #PILE TYPESTRUCTURE NAMELEAD DESCRIPTION EXTENSION DESCRIPTIONCAP DESCRIPTION
2HP-01 
3HP-02 
4HP-03 
5HP-04 
6HP-05 
7HP-06 
8HP-07 
9HP-08 
10HP-09 
11HP-10 
12HP-11 
13HP-12 
14HP-13 
15HP-14 
16HP-15 
17HP-16 
18HP-17 
19HP-18 
20HP-19 
21HP-20 
As-built 1
Cell Formulas
RangeFormula
A2:A21A2="HP-"&TEXT(SEQUENCE('Input page'!B3),"00")
D2:D21D2=FILTER('Input page'!$D$4:$F$9,'Input page'!$C$4:$C$9=$B2,"")
Dynamic array formulas.
 

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)
alternating row styles can be achieved with Conditional Formatting formulas: =MOD(ROW(),2)=0 and =MOD(ROW(),2)=1

Book1
ABCDEF
1BLAHBLAHBLAHBLAHBLAHBLAH
2dummy1
3dummy2
4dummy3
5dummy4
6dummy5
7dummy6
8dummy7
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:F8Expression=MOD(ROW(),2)=0textNO
A2:F8Expression=MOD(ROW(),2)=1textNO


How would i get this sheet to alternate rows between2 different cell style but link it to where it does not apply if there is no data the column A? the sheet can be anywhere between 2 rows or 4000.
For the other part I don't know what you mean.
 
Upvote 0
I ended up using =AND(LEN($A1) > 0, MOD(ROW(), 2) = 0) for even rows and
=AND(LEN($A2) > 0, MOD(ROW(), 2) <> 0) for odd rows


Thanks for answering though!
 
Upvote 0
Solution
Note that you do not need to use the MOD function to calculate even and odd values. Excel already has functions ISODD and ISEVEN.
Excel Formula:
=ISODD(ROW())
Excel Formula:
=ISEVEN(ROW())
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,983
Members
449,092
Latest member
Mr Hughes

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