View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Making rows variable

Is this the sort of thing that you mean?

Dim White As Range
Dim Source As Range
Dim Destination As Range
Dim iRow As Long

Do
iRow = iRow + 1
Set White = Worksheets("Sales Invoice").cells(iRow,"L")
Set Source = Worksheets("Purchase").Rows(iRow)
Source.Select

Source.Copy ActiveCell.EntireRow.Offset(1, 0)

Loop Until IsEmpty(White.Value)


--

HTH

RP
(remove nothere from the email address if mailing direct)


"VBA_Learner"
wrote in message
...

Hi,

Any help would be greatly appreciated as I am just getting grips with
how all of this works.

I have pieced together most of what I need through browsing other
threads and Ron De Bruin help but I just can't get the last.

I need the following code to work for instances where the rows increase
by +1. So next time it loops through it picks up row(3:3) etc. Nothing
I have tried so far works.

Do
Dim White As Range
Dim Source As Range
Dim Destination As Range

Set White = (Sheets("Sales Invoice").Columns("L:L"))
Set Source = (Sheets("Purchase").rows("2:2"))
Source.Select

Source.Copy ActiveCell.EntireRow.Offset(1, 0)

Loop Until IsEmpty(White)

Thanks.


--
VBA_Learner
------------------------------------------------------------------------
VBA_Learner's Profile:

http://www.excelforum.com/member.php...o&userid=25138
View this thread: http://www.excelforum.com/showthread...hreadid=386340