ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move data worksheet to worksheet (https://www.excelbanter.com/excel-programming/432057-move-data-worksheet-worksheet.html)

ap19

Move data worksheet to worksheet
 
Hello,
I have a worksheet called (Template). I want to move the values in column H
to a new worksheet called (Output) begining from A1 downwards. The results in
column H can be spaced out, for example;
h5 - $150
h6 - $125
h7-
h8- $75
I would like them to have the space removed when transfered to Output
worksheet. Also, everytime the code is run I would like the results from
Template to Append to the last row of data in the Output worksheet. Hope this
makes sense. Thanks in advance for your time.

Otto Moehrbach[_2_]

Move data worksheet to worksheet
 
Something like this perhaps: HTH Otto
Sub Macro1()
Dim rColH As Range
Dim Dest As Range
With Sheets("Output")
Set Dest = .Range("A" & Rows.Count).End(xlUp).Offset(1)
Set rColH = Range("H5", Range("H" & Rows.Count).End(xlUp))
rColH.SpecialCells(xlCellTypeConstants, 23).Copy Dest
End With
End Sub
"ap19" wrote in message
...
Hello,
I have a worksheet called (Template). I want to move the values in column
H
to a new worksheet called (Output) begining from A1 downwards. The results
in
column H can be spaced out, for example;
h5 - $150
h6 - $125
h7-
h8- $75
I would like them to have the space removed when transfered to Output
worksheet. Also, everytime the code is run I would like the results from
Template to Append to the last row of data in the Output worksheet. Hope
this
makes sense. Thanks in advance for your time.




ap19

Move data worksheet to worksheet
 
Otto
This works great. One other question if I may....the code picks up all the
values in H, however under the last value , the cell contains a Sum
calculation,.Can the code be modified to inlcude a calculation.

Thanks soo much

"Otto Moehrbach" wrote:

Something like this perhaps: HTH Otto
Sub Macro1()
Dim rColH As Range
Dim Dest As Range
With Sheets("Output")
Set Dest = .Range("A" & Rows.Count).End(xlUp).Offset(1)
Set rColH = Range("H5", Range("H" & Rows.Count).End(xlUp))
rColH.SpecialCells(xlCellTypeConstants, 23).Copy Dest
End With
End Sub
"ap19" wrote in message
...
Hello,
I have a worksheet called (Template). I want to move the values in column
H
to a new worksheet called (Output) begining from A1 downwards. The results
in
column H can be spaced out, for example;
h5 - $150
h6 - $125
h7-
h8- $75
I would like them to have the space removed when transfered to Output
worksheet. Also, everytime the code is run I would like the results from
Template to Append to the last row of data in the Output worksheet. Hope
this
makes sense. Thanks in advance for your time.






All times are GMT +1. The time now is 10:38 PM.

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