I have a macro that goes through all the sheets in a file and adds columns. I would like to add a condition so that it only adds these columns in sheets where a cell with the value "ABC" exists, and leaves the other sheets unchanged. What should the IF function look like?
**For Each ws In Worksheets
u = Application.WorksheetFunction.CountIfs(Range("A:QZ"), "ABC")
If u Then
ws.Activate**
End If
Next ws
Wb.Save
Wb.Close False
strFil = Dir
Loop
End Sub