为什么我的macros不会删除所有的行(VBA)

我有这个macros它应该删除没有背景设置给他们的所有单元格,但是当我执行macros,如果两个或多个连续的单元格没有背景,它只会删除其中的一个,这里是代码:

Sub Macro1() Dim a As Range Set a = Hoja1.Range("A1:A12") For Each cell In a If cell.Interior.ColorIndex = xlNone Then cell.EntireRow.Delete End If Next End Sub 

 Sub Macro1() Dim a As Range, x As Long Set a = Hoja1.Range("A1:A12") For x = a.cells.count to 1 Step -1 with a.cells(x) if .Interior.ColorIndex = xlNone Then .EntireRow.Delete End With Next x End Sub