Maybe:Hi All
I'm struggling with this code. I don't know how to do it in VBA. Here is what I want the code to say:
If row is even then
Code goes here
End If
Thanks.
If row mod 2 = 0 then
'code here
Sub MM1()
Dim lr As Long, r As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For r = 1 To lr
If r Mod 2 = 0 Then
With Rows(r)
.Clear ' This code deletes the check mark and the color green
.Style = "Check Cell" 'sets the cell style using a custom style named Custom Gray
End With
Else:
Rows(r).Clear
End If
Next r
End Sub
Sub MM1()
Dim lr As Long, r As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For r = 1 To lr
If r Mod 2 = 0 Then
With Range("A" & r)
.Clear ' This code deletes the check mark and the color green
.Style = "Check Cell" 'sets the cell style using a custom style named Custom Gray
End With
Else:
Range("A" & r).Clear
End If
Next r
End Sub
Sub ClearCheckmark()
Sheets("Sheet1").Select
With activecell
.Clear ' This code deletes the check mark and the color green
If .Row Mod 2 = 0 Then .Style = "Grey" 'sets the cell style using a custom style named Custom Gray
.Offset(0, 1).Select
End With
End Sub