Option explicit
sub testme01()
dim myCell as range
dim destCell as range
with worksheets("receivingWks")
set destcell = .cells(.rows.count,"A").end(xlup).offset(1,0)
end with
with worksheets("sendingWks")
set mycell = .range("b9")
if mycell.value < 100 then
mycell.entirerow.copy _
destination:=destcell
end if
end with
End sub
And if I wanted to loop through the rows of one worksheet and copy some of the
rows over to a different worksheet.
Option Explicit
Sub testme02()
Dim myCell As Range
Dim destCell As Range
Dim iRow As Long
With Worksheets("receivingWks")
Set destCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
End With
With Worksheets("sendingWks")
For iRow = 2 To .Cells(.Rows.Count, "A").End(xlUp).Row
If .Cells(iRow, "B").Value < 100 Then
.Rows(iRow).Copy _
Destination:=destCell
Set destCell = destCell.Offset(1, 0)
End If
Next iRow
End Sub
Note that both of these routines rely data in column A. (Otherwise, you'll have
to find some other way to determine the "destination cell" and the number of
rows to loop through.)