ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to know which row to append for the last row (https://www.excelbanter.com/excel-programming/313735-how-know-row-append-last-row.html)

tango

how to know which row to append for the last row
 
dear all,
i manage to create header(from header sheet) and details(from detail
sheet) data and paste in final sheet. i face the problem of putting
the last row which is the trailer of the record from trailer sheet.
all i use macro to do it. in the copy and paste what function to use
in macro to identify which is the row immediately after the last
detail row. please help and thanks alot.


142130091000100Merseng Khung 16102004
14213009100018811218900112373000000000005000D.S KRISA A/P D.
SEL821105146056
14213009100018815402200005114000000000012025DAVID ANAK PALIT
770623135923
14213009100018816218400030391000000000009500ELLY MARINA SAERDG
791010105396
1421300910001881111111111 000000000009900THIS IS TESTING
9999999999
14213009100018822222222 000000000004500THIS IS 2ND
33333333333
14213009100018833333333 000000000034500THIS IS 3RD
444444444
HOW TO KNOW THIS IS THE TRAILER

Rob van Gelder[_4_]

how to know which row to append for the last row
 
I think the line wrapping has screwed with your example.

Just a guess, but could you check to see if the first character of each line
is numeric?


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"tango" wrote in message
om...
dear all,
i manage to create header(from header sheet) and details(from detail
sheet) data and paste in final sheet. i face the problem of putting
the last row which is the trailer of the record from trailer sheet.
all i use macro to do it. in the copy and paste what function to use
in macro to identify which is the row immediately after the last
detail row. please help and thanks alot.


142130091000100Merseng Khung 16102004
14213009100018811218900112373000000000005000D.S KRISA A/P D.
SEL821105146056
14213009100018815402200005114000000000012025DAVID ANAK PALIT
770623135923
14213009100018816218400030391000000000009500ELLY MARINA SAERDG
791010105396
1421300910001881111111111 000000000009900THIS IS TESTING
9999999999
14213009100018822222222 000000000004500THIS IS 2ND
33333333333
14213009100018833333333 000000000034500THIS IS 3RD
444444444
HOW TO KNOW THIS IS THE TRAILER




James Butler

how to know which row to append for the last row
 
Just to clarify you basically want to find the bottom of your data and
then paste the trailer?? if this is the case use:

trailer.Copy Destination:=finalsheet.Cells(Cells(65536,
1).End(xlUp).Row + 1, 1)

where trailer and finalsheet you will need to amend.

I hope I have not misunderstood what you are trying to do.


James


(tango) wrote in message . com...
dear all,
i manage to create header(from header sheet) and details(from detail
sheet) data and paste in final sheet. i face the problem of putting
the last row which is the trailer of the record from trailer sheet.
all i use macro to do it. in the copy and paste what function to use
in macro to identify which is the row immediately after the last
detail row. please help and thanks alot.


142130091000100Merseng Khung 16102004
14213009100018811218900112373000000000005000D.S KRISA A/P D.
SEL821105146056
14213009100018815402200005114000000000012025DAVID ANAK PALIT
770623135923
14213009100018816218400030391000000000009500ELLY MARINA SAERDG
791010105396
1421300910001881111111111 000000000009900THIS IS TESTING
9999999999
14213009100018822222222 000000000004500THIS IS 2ND
33333333333
14213009100018833333333 000000000034500THIS IS 3RD
444444444
HOW TO KNOW THIS IS THE TRAILER



All times are GMT +1. The time now is 06:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com