route217
asked on
compile error variable not defined in macro
Hi experts
I am trying to run the following macro and I am getting the msg as per subject box
vba code:
on line .row to step -1
I am trying to run the following macro and I am getting the msg as per subject box
vba code:
Sub Tidyup() Dim ws As Worksheet Dim i As Long For Each ws In Worksheets(Array("Daily Data", "MTD Data", "Weekly Data", "Monthly Data")) For i = ws.Range("B" & Rows.Count).End(xlUp).Row To Step -1 If ws.Range("B" & i) Like "DMX*" Then ws.Range("B" & i).Resize(, 30).Delete xlShiftUp End If Next i Next ws End Sub
on line .row to step -1
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No problem.
Credit to IrogSinta, though. (S)he was here first! :)
Credit to IrogSinta, though. (S)he was here first! :)
Do you have a header row?
ASKER
yes I do imnoire....in row 1 each sheet
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER