Grouping Data

Salar

Board Regular
Joined
Mar 19, 2008
Messages
122
Hi All,

At work I am grouping data from maintenance records to look at frequency of service.

The groups I have are like the following

A12-0001
A12-0001
A12-0001
A12-0002
A12-0002
A12-0003
A12-0003
A12-0003
A12-0003

This list can go on up to 20000 rows. Each group should have an even number of entries and should be of the following sequence ie. 2,4,8,12,16,20, or 24.

What I need is a macro for column A in my spreadsheet that would review the entries an highlight any anomalies. In the example above it would be A12-0001 Highlightling would be by changing colour of the group cells with the anomaly.

Incidentally I am using Excel 2003.

Thanks for any help

Salar
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,402
If you put the 2,4,8 etc in a list, named say ValidList, then you could use conditional formatting, with a condition of:
Code:
=ISNA(MATCH(COUNTIF($A$1:$A$20000,A1),validlist,0))
... and choose a suitable format. ( assuming that you are selecting the range, starting in cell A1 ).
 

Watch MrExcel Video

Forum statistics

Threads
1,108,624
Messages
5,523,968
Members
409,547
Latest member
AW2020

This Week's Hot Topics

Top