Highlighting rows in a column when number changes (numbers are in consecutive order)

mstaralynn

New Member
Joined
Jan 25, 2023
Messages
5
Office Version
  1. 365
Platform
  1. MacOS
Hello - I have been trying to find a solution to this and have so far can up empty - but it seems like there HAS to be a way. I have a column with numbers in consecutive order - there could be 5 of one number, 3 of the next, 7 of the one after that - so I need to copy/paste info that correlates with the number. Problem is sometimes the numbers are similar and I miss the change and copy the wrong info. If I could have the rows colored, and change each Tim the number changes - I could visually see how far down I need to copy the info. The colors do not matter - its really just a visual guide. I tried the Conditional Formatting, Color Scales - and that doesn't work because they are in consecutive order. Also - find duplicates doesn't work either. Please see in the pic how I want the row to look - it could be the same 2 colors alternating at each number change - color doesn't matter. This is something I do very often and any way to make it easier is nice. THANK YOU!!!
 

Attachments

  • Screen Shot 2023-01-25 at 1.44.45 PM.png
    Screen Shot 2023-01-25 at 1.44.45 PM.png
    169.5 KB · Views: 22
A couple of issues
  1. You have applied Conditional Formatting to an entire column. How much data do you actually have? Since Conditional Formats are volatile I would not recommend applying them to an entire column as every time Excel recalculates for any reason the CF will have to evaluate all 2 x 1,048,576 CF formulas to determine if the cell should be formatted a particular way.

  2. If you are going to apply the CF to cells below where the data is then a slight adjustment to the formula might be in order anyway.

So, in my dummy example below I have data in rows 2:12 but I want to allow for possible data down to row 20. I select from D2 (not D1) down to D20 and apply the shown CF formulas.
Is that something that you could adapt to suit your circumstances?

23 01 26.xlsm
D
1Number
2a5
3a5
4a5
5b3
6b3
77
87
97
10d6
11e45
12e45
13
14
15
16
17
18
19
20
Bands (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:D20Expression=AND(ISEVEN(ROWS(UNIQUE(D$2:D2))),D2<>"")textNO
D2:D20Expression=AND(ISODD(ROWS(UNIQUE(D$2:D2))),D2<>"")textNO
Thank you!!!! This worked!! I didn't realize I needed to only select the data and not the entire column. There are around 450 rows. Thank you so much!
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,393
Members
449,081
Latest member
JAMES KECULAH

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