Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete rows based on multiple criteria | Excel Discussion (Misc queries) | |||
Delete all rows if criteria not matched | Excel Discussion (Misc queries) | |||
Delete rows if specific criteria not met. | Excel Worksheet Functions | |||
Delete rows based on criteria | Excel Discussion (Misc queries) | |||
Delete rows based on certain criteria | Excel Discussion (Misc queries) |