R
RickK
I'm making a basic statement error in my program lines
below. Please help.
The company is tracking sales data. Sale rep's send in a
xl sheet monthly. Their data is imported into a master xl
sheet for charting, statics and review. Any row in the
spread sheet that has valid data, row "S" will contain
a "1", Else "0" or "" if it is at then end of the master
sheet.
I need to clean this up so the that sheet contains only
valid data ("1")
What an I missing here
Sub CleanRows()
Dim r As Range
With Worksheets("Sheet1")
For Each r In Range("S2:S" & Cells(Rows.Count, "S").End
(xlUp).Row)
If r.Value = "" Then
Exit Sub
ElseIf r.Value = 0 Then
Rows.Delete
End If
Next
End With
End Sub
below. Please help.
The company is tracking sales data. Sale rep's send in a
xl sheet monthly. Their data is imported into a master xl
sheet for charting, statics and review. Any row in the
spread sheet that has valid data, row "S" will contain
a "1", Else "0" or "" if it is at then end of the master
sheet.
I need to clean this up so the that sheet contains only
valid data ("1")
What an I missing here
Sub CleanRows()
Dim r As Range
With Worksheets("Sheet1")
For Each r In Range("S2:S" & Cells(Rows.Count, "S").End
(xlUp).Row)
If r.Value = "" Then
Exit Sub
ElseIf r.Value = 0 Then
Rows.Delete
End If
Next
End With
End Sub