-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: kalpesh
Message 4 in Discussion

So, you want to append data from 4 workbooks to one workbook, right ?

so when you copy from wkbook 1, you know how many rows, you will be copying & from 
what point, your destination start row & end row will be

for eg if you are copying data programatically (9000 rows), you know that, you will 
paste into your destination workbook from row 1 to row 9000

then, if you are pasting from wkbook2, the paste operation will begin from row 9001 to 
18000 (an example)

so, if you know this, after 1st paste operation is done
you can do

[this vars will keep updating new start row, from where the paste will start & erow - 
will store the row where paste will end]
dim srow as integer ' start row of paste
dim erow as integer 'end row of paste

'you can use a var here instead of 1, which will be incremented after each operation

range("p" & srow & ":" & "p" & erow).value = 1

OR

psuedocode
[this vars [srow & erow] will keep updating new start row, from where the paste will 
start & erow - will store the row where paste will end]
====================
paste op1
range("p" & srow & ":" & "p" & erow).value = 1
goto cell, where next paste will begin

paste op2
range("p" & srow & ":" & "p" & erow).value = 2
goto cell, where next paste will begin

paste op3
range("p" & srow & ":" & "p" & erow).value = 3
goto cell, where next paste will begin

paste op4
range("p" & srow & ":" & "p" & erow).value = 4
goto cell, where next paste will begin

HTH
Kalpesh

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to