I want to delete the value of a cell if its colorindex = yellow
i wrote this code
but some where its shows error.
Option Explicit
Sub YelloDelete()
Dim M As Long
Range("A1").Select
M = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
For M = M To 1 Step -1
With Range("A" & M)
.ColorIndex = 6
.cell.Value = ""
End With
Next M
End Sub
I want to delete the value from A range to E range if its back ground color is yellow?
understand the question?
i wrote this code
but some where its shows error.
Option Explicit
Sub YelloDelete()
Dim M As Long
Range("A1").Select
M = Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
For M = M To 1 Step -1
With Range("A" & M)
.ColorIndex = 6
.cell.Value = ""
End With
Next M
End Sub
I want to delete the value from A range to E range if its back ground color is yellow?
understand the question?