Check rows and paste
Hi,
Can VBA check that the last row is the empty without
data from sheet1 of "test.xls" first,follow by copy the
data from sheet1 from "test.xls"and paste it to new
sheet1 of new "book1.xls". If the last row is blank,
append another rows of data from another sheet eg sheet2
from "test1.xls"
eg
In test1.xls, sheet1
Row 1 Date Name Contact
Row 2 20/04 John 2346712
Row3 20/06 Jane 1234678
Row 4 20/06 Kelly 2345678
imagine i delete row3 "Kelly" above, I hane left only
Row 1 Date Name Contact
Row 2 20/04 John 2346712
Row 3 20/06 Kelly 2345678
Copy the above data from sheet1 of "test1.xls" and paste
into sheet1 of "Book1.xls".
I will have data as in sheet1 of "Book1.xls" as below:
Row 1 Date Name Contact
Row 2 20/04 John 2346712
Row 3 20/06 Kelly 2345678
This will append the data from row 0 from sheet2
of "test1.xls" as shown below:
sheet2 of "test1.xls" have
Row 0 Date Name Contact
Row 1 20/04 Jerry 2346712
Row 2 20/06 susan 2345678
therefore, I will have overal data in sheet1
of :Book1.xls" as shown below:
Row 1 Date Name Contact
Row 2 20/04 John 2346712
Row 3 20/06 Kelly 2345678
Row 0 Date Name Contact
Row 1 20/04 Jerry 2346712
Row 2 20/06 susan 2345678.
please advise.
regards,
Joe
|