Hi
I've tried different methods to include multiple if statements in a for loop but they don't seem to work and I'm not sure what the problem is. I keep getting the message "End If without block If" I have a different condition for each of the statements. Can someone help me please
For Z = 4 To lastrowG
If WorksheetFunction.isblank(data.Cells(Z, 147)) Then data.Cells(Z, 148).clearcontent
ElseIf data.Cells(Z, 154) = "F" Or data.Cells(Z, 154) = "FI" Or data.Cells(Z, 154) = "TC" Then data.Cells(Z, 148).clearcontent
ElseIf data.Cells(Z, 147) = "Duplicate" Then data.Cells(Z, 148).clearcontent
ElseIf data.Cells(Z, 148) = "Yes" And WorksheetFunction.isblank(data.Cells(Z, 159)) Then data.Cells(Z, 159) = "NA"
End If
Next Z
Bookmarks