Option Explicit
[COLOR=navy]Dim[/COLOR] Rng [COLOR=navy]As[/COLOR] Range, temp [COLOR=navy]As[/COLOR] Range, c [COLOR=navy]As[/COLOR] [COLOR=navy]Long,[/COLOR] Ray()
Private [COLOR=navy]Sub[/COLOR] Worksheet_Change(ByVal Target [COLOR=navy]As[/COLOR] Range)
[COLOR=navy]Dim[/COLOR] col [COLOR=navy]As[/COLOR] [COLOR=navy]Long[/COLOR]
c = c + 1
ReDim Preserve Ray(c)
Ray(c) = Target.Interior.Color
[COLOR=navy]If[/COLOR] c > 2 [COLOR=navy]Then[/COLOR] col = Ray(UBound(Ray) - 2)
[COLOR=navy]If[/COLOR] Rng [COLOR=navy]Is[/COLOR] Nothing [COLOR=navy]Then[/COLOR]
[COLOR=navy]Set[/COLOR] Rng = Target
[COLOR=navy]Else[/COLOR]
Rng.Interior.Color = vbYellow
If Not temp Is Nothing Then temp.Interior.Color = col
[COLOR=navy]Set[/COLOR] temp = Rng
[COLOR=navy]Set[/COLOR] Rng = Target
[COLOR=navy]End[/COLOR] If
[COLOR=navy]End[/COLOR] [COLOR=navy]Sub[/COLOR]