NOTE
- method below assumes that each "group" of words is unique (ie there is only one group of dogs, one fleet of planes etc!)
Excel 2016 (Windows) 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]A
[/th][th]B
[/th][th]C
[/th][th]D
[/th][th]E
[/th][th]F
[/th][th]G
[/th][th]H
[/th][th]I
[/th][th]J
[/th][th]K
[/th][th]L
[/th][th]M
[/th][th]N
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]1
[/td][td]cat[/td][td]cat[/td][td]dog[/td][td]dog[/td][td]dog[/td][td]plane[/td][td]plane[/td][td]plane[/td][td]plane[/td][td]plane[/td][td]pear[/td][td]pear[/td][td]pear[/td][td]pear[/td][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]2
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]3
[/td][td]1
[/td][td]1
[/td][td]2
[/td][td]2
[/td][td]2
[/td][td]3
[/td][td]3
[/td][td]3
[/td][td]3
[/td][td]3
[/td][td]4
[/td][td]4
[/td][td]4
[/td][td]4
[/td][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]4
[/td][td]TRUE
[/td][td]TRUE
[/td][td]FALSE
[/td][td]FALSE
[/td][td]FALSE
[/td][td]TRUE
[/td][td]TRUE
[/td][td]TRUE
[/td][td]TRUE
[/td][td]TRUE
[/td][td]FALSE
[/td][td]FALSE
[/td][td]FALSE
[/td][td]FALSE
[/td][/tr]
[/table][Table="width:, class:grid"][tr][td]Sheet:
Sheet1[/td][/tr][/table]
1. Explanation
The formula in rows 3 & 4 are there so that you can see how this works
To get
cumulative count of unique values starting at A1
- in A3 copied across
=
SUMPRODUCT(1/COUNTIF($A$1:A$1,$A$1:A$1&""))
Convert those value to TRUE\False by wrapping above formula in
ISODD
- in A4 copied across
=
ISODD(SUMPRODUCT(1/COUNTIF($A$1:A$1,$A$1:A$1&"")))
2. Apply conditional formatting using formula in A4
Select row 1
click on
Home tab
click on
Conditional Formatting
click on New Rule
click on Use a formula to determine which cells to format
paste formula
=ISODD(SUMPRODUCT(1/COUNTIF($A$1:A$1,$A$1:A$1&""))) into box under
Format values where this formula is true
click on Format
above example was formatted by clicking on
Font and changing
Color to
red
Conditional Formatting can be tricky
- the formula must be correct for the leftmost cell in the range you are formatting
- I suggest you copy what I did EXACTLY (including putting the values in row 1)
- you can then insert rows above or columns to left of data and Excel auto-adjusts
- otherwise you need to amend the formula before trying to use it in conditional formatting