Share via

Excel Conditional Formatting using a formula

Anonymous
2021-07-01T10:27:16+00:00

I have 10 rows in a table with only the first column populated with cities. If the city equals the prior city I want to change its color to gray. Hence, in the spreadsheet below, rows 2,3,6,7 would be gray. I highlight rows 2 through 10, first column, and then click on 'Conditional Formatting'/'Manage Rules'/'New Rule'. The 'Formula' is =A2=A1 and the 'Applies to' is =R2C1:R10C1. It does not get much simpler than this but after an hour of trying and reading 'how to' posts I cannot get the rows to turn grey. What is wrong with my formula?

row 1: Miami
row 2: Miami
row 3: Miami
row 4: Austin
row 5: Dallas
row 6: Dallas
row 7: Dallas
row 8: Boise
row 9: Spokane
row 10: Portland

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2021-07-01T11:02:57+00:00

Applies to =R2C1:R10C1 makes me think that you use R1C1 notation. If that is correct, the formula in the conditional formatting rule should be =RC=R[-1]C

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful