Conditional Formatting for alternate client refs

G

Guest

I have multiple rows, each with a client ref in column A (in the format:
B01234) - the data is sorted in ascending order by column A.
I would like to define some conditional formatting, so that alternate client
refs are either yellow or white - where a client ref is repeated, the rows
are to be one colour. For example, if rows 2-5 relate to client ref B01234,
I want all the rows to be yellow. If rows 6-7 relate to another client, I
want the rows to be white. Then if row 8 was yet another client, the row
should be yellow again.
Any ideas what I should enter into the conditional formatting prompt?
 
V

vezerid

Select all the cells that you want colored, except the first row of
data (i.e. from row 3 and down).
Format>Conditional Formatting> Formula Is:

=$A3<>$A2

Set the condition to yellow.

HTH
Kostis Vezerides
 
G

Guest

I don't think this does what is required: it doesn't colour all cells for a
given client.
 
G

Guest

I had to use a helper column (in my case column C) with :

=INT(SUM(1/COUNTIF($A$2:A2,$A$2:A2)))

Enter with Ctrl+Shift+Enter and copy down column A

then set CF:

FormulaIs: =MOD($C2,2) and set to yellow

There may (will!) be a smarter way

Limited testing!
 
G

Guest

Hey, that worked a treat, thank you so much!

Toppers said:
I had to use a helper column (in my case column C) with :

=INT(SUM(1/COUNTIF($A$2:A2,$A$2:A2)))

Enter with Ctrl+Shift+Enter and copy down column A

then set CF:

FormulaIs: =MOD($C2,2) and set to yellow

There may (will!) be a smarter way

Limited testing!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top