Use conditional formatting:
-select G2:Gxxx
-insert a conditiona format, with the clause "Use a formula to determine which cells have to be formatted"
-use the formula =AND($A1<>$A2;G2<>"")
-add the preferred formatting
-press Enter /Enter to complete the action
Bye