The only way I see this is to create a new column. This may be hidden if you want.
Drop this formula into any new column and run autocomplete:
=IFERROR(IF(A1<>INDIRECT("A"&ROW()-1),IF(INDIRECT(CHAR(COLUMN()+64)&ROW()-1)=0,1,0),INDIRECT(CHAR(COLUMN()+64)&ROW()-1)),1)
Change A1 as needed to start your data. You can also replace the INDIRECT(...) offset with an offset, but then you must specify in which column you are inserting the formula. Therefore, to give an example in this way; if you put it in column B:
=IFERROR(IF(A1<>INDIRECT("A"&ROW()-1),IF(OFFSET(B1,-1,0)=0,1,0),OFFSET(B1,-1,0)),1)
This formula gives us a column of 0 and 1, which tells us to either make the background color or leave it white.
So, in your conditional formatting, just apply it to the desired range and use "Custom formula is":
=$B1
Choose formatting as desired
source share