I am using the code below to find any cells in the designated range that have "yes" or "no". In doing so, i was wanting to supply some special formatting for each instance.
Issue is I am receiving a "Compile Error: Next Without for Error". Could anyone tell me what I am doing wrong to resolve this issue??
Issue is I am receiving a "Compile Error: Next Without for Error". Could anyone tell me what I am doing wrong to resolve this issue??
Code:
Sub ValidateAuditData()
'Create macro to validate the input data
Dim AuditRange As Range
Set AuditRange = Worksheets("Sheet1").Range("A6:D199")
AuditRange.SpecialCells(xlCellTypeBlanks).Interior.ColorIndex = 6
'Create code to remove fill
For Each cell In AuditRange
If cell.Value = "Yes" Then
cell.Interior.ColorIndex = 4
cell.Font.Bold
If cell.Value = "No" Then
cell.Interior.ColorIndex = 3
cell.Font.Bold
Next
End Sub