Capture
This is great. Thank you for the help.
"Joel" wrote:
Sub Capture0405()
set oldsht = activesheet
Set newsht = Sheets.Add(after:=Sheets(Sheets.Count))
newsht.Name = "0405"
NewRow = 1
with oldsht
OldRow = 1
do while .Range("I" & OldRow) < ""
if .Range("I" & OldRow) = 4 or _
.Range("I" & OldRow) = 5 then
.Range("A" & OldRow & ":H" & OldRow).copy _
Destination:=NewSht.Range("A" & Newrow)
NewRow = NewRow + 1
end if
OldRow = OldRow + 1
Loop
End Sub
"Sal" wrote:
Every time Column I has 04 or 05 in a row, I would like to cut that
entire row Columns A:AH, create a new worksheet named 0405 , and paste
those cut rows into the new worksheet, so that the rows do not overlap.
Here is what I have so far. Any help would be appreciated.
Sub Capture0405()
Set newsht = Sheets.Add(after:=Sheets(Sheets.Count))
newsht.Name = "0405"
End Sub
|