Conditional Formatting Google Spreadsheets

I received 4 different purchase orders, with a random purchase order number on it. I populate the purchase order number in column A only.

For this example I received the 4 different purchase purchase orders listed below.

Purchase Order 697533 - 2 Items
Purchase Order 697549 - 3 Items
Purchase Order 697564 - 1 Items
Purchase Order 697565 - 2 Items

I would like to highlight all the rows that have a purchase order of "697533" in blue.

In purchase order 697549, I would like to highlight all the rows that has a PO # of 697549 in white.

Then in purchase order 697564 I would like to highlight all the items back in blue.

Finally in purchase order 697565 I would like to highlight all the items back in white.

I would like to continue switching between matching purchase order numbers with the colors alternating.

How can I apply this to the spread sheets ?

Please see the screenshot of this situation

Thank you all for your help!!

Upvotes: 1

Views: 65

Answers (2)

Cameron Hudson
Cameron Hudson

Reputation: 3931

Set this as the custom formula:

=MOD(COUNTUNIQUE($A$2:$A2),2)

Upvotes: 3

user4039065
user4039065

Reputation:

Try a CFR based on this custom formula,

=isodd(rank($A2, unique($A$2:$A), 1))

enter image description here

Linked spreadsheet

Upvotes: 2

Related Questions