I keep getting a error on the below line. I have been trying to figure this for a while and no longer posses the ability to think out side the box.
The macro looks for cells with "0" in them and deletes the zero.
I get errors on these two lines,
![]()
For Each ws In wb For Each cel In .UsedRange 'Range("A1:N" & LR)
![]()
Sub clear() Dim cel As Range Dim LR As Long Dim ws As Worksheet Dim wb As Workbook Set ws = ActiveSheet Set wb = ActiveWorkbook LR = ActiveSheet.Cells(ActiveSheet.Rows.Count, 1).End(xlUp).Row With ActiveSheet 'On Error Resume Next Set cel = ActiveCell For Each ws In wb For Each cel In .UsedRange 'Range("A1:N" & LR) If cel = "0" Then cel.ClearContents Next cel Next ws End With End Sub
Bookmarks