Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to paste to last row in another sheet
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. 1 header 6 detail line 1 trailer all the below populate in same column which is A 142130091000100Merseng Khung 16102004 (header) 142130091000188112189001123730000005000D.S KRISA A/P D. 142130091000188154022000051140000012025DAVID ANAK PALIT 142130091000188162184000303910000009500ELLY MARINA SAERDG 1421300910001881111111111 0000009900THIS IS TESTING 14213009100018822222222 0000004500THIS IS 2ND 14213009100018833333333 0000034500THIS IS 3RD HOW TO KNOW THIS IS THE TRAILER (trailer) yes, first character is number for all 3 components. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to paste to last row in another sheet
This will return 7 in your example:
lngLastRow = Sheets("Final").Cells(Rows.Count, 1).End(xlUp).Row -- 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. 1 header 6 detail line 1 trailer all the below populate in same column which is A 142130091000100Merseng Khung 16102004 (header) 142130091000188112189001123730000005000D.S KRISA A/P D. 142130091000188154022000051140000012025DAVID ANAK PALIT 142130091000188162184000303910000009500ELLY MARINA SAERDG 1421300910001881111111111 0000009900THIS IS TESTING 14213009100018822222222 0000004500THIS IS 2ND 14213009100018833333333 0000034500THIS IS 3RD HOW TO KNOW THIS IS THE TRAILER (trailer) yes, first character is number for all 3 components. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to paste to last row in another sheet
Rob van Gelder wrote:
This will return 7 in your example: lngLastRow = Sheets("Final").Cells(Rows.Count, 1).End(xlUp).Row This is the often-suggested, perhaps the most often-suggested, solution; it is even embodied in purportedly general purpose code at the web site of Frank Kabel and Bob Phillips. It works for *almost* all cases, but fails if the last row of the worksheet contains data, probably a rare occurrence. Alan Beban |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to paste to last row in another sheet
Frank and Bob have web sites?
-- Rob van Gelder - http://www.vangelder.co.nz/excel "Alan Beban" wrote in message ... Rob van Gelder wrote: This will return 7 in your example: lngLastRow = Sheets("Final").Cells(Rows.Count, 1).End(xlUp).Row This is the often-suggested, perhaps the most often-suggested, solution; it is even embodied in purportedly general purpose code at the web site of Frank Kabel and Bob Phillips. It works for *almost* all cases, but fails if the last row of the worksheet contains data, probably a rare occurrence. Alan Beban |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to paste to last row in another sheet
One combined site:
http://www.xldynamic.com/source/xld.Rounding.html#vba as an example or just http://www.xldynamic.com -- Regards, Tom Ogilvy "Rob van Gelder" wrote in message ... Frank and Bob have web sites? -- Rob van Gelder - http://www.vangelder.co.nz/excel "Alan Beban" wrote in message ... Rob van Gelder wrote: This will return 7 in your example: lngLastRow = Sheets("Final").Cells(Rows.Count, 1).End(xlUp).Row This is the often-suggested, perhaps the most often-suggested, solution; it is even embodied in purportedly general purpose code at the web site of Frank Kabel and Bob Phillips. It works for *almost* all cases, but fails if the last row of the worksheet contains data, probably a rare occurrence. Alan Beban |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to paste to last row in another sheet
Thanks.
I had been there but never knew who it belonged to. Cheers -- Rob van Gelder - http://www.vangelder.co.nz/excel "Tom Ogilvy" wrote in message ... One combined site: http://www.xldynamic.com/source/xld.Rounding.html#vba as an example or just http://www.xldynamic.com -- Regards, Tom Ogilvy "Rob van Gelder" wrote in message ... Frank and Bob have web sites? -- Rob van Gelder - http://www.vangelder.co.nz/excel "Alan Beban" wrote in message ... Rob van Gelder wrote: This will return 7 in your example: lngLastRow = Sheets("Final").Cells(Rows.Count, 1).End(xlUp).Row This is the often-suggested, perhaps the most often-suggested, solution; it is even embodied in purportedly general purpose code at the web site of Frank Kabel and Bob Phillips. It works for *almost* all cases, but fails if the last row of the worksheet contains data, probably a rare occurrence. Alan Beban |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to automatically paste cells from one sheet to another sheet? | Excel Discussion (Misc queries) | |||
Alternate Row Select in Sheet 1 then Paste to Sheet 2 | Excel Worksheet Functions | |||
Copy from one Sheet and paste on another sheet based on condition | Excel Discussion (Misc queries) | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
Paste a sheet as a link | Excel Programming |