ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy range C5:Lastrow and paste to two different worksheets (https://www.excelbanter.com/excel-programming/441395-copy-range-c5-lastrow-paste-two-different-worksheets.html)

PVANS

Copy range C5:Lastrow and paste to two different worksheets
 
Good morning

I cannot seem to find a solution to this, and hope someone might be able to
help me.

I have three worksheets: Ratios, Trades, Trades2

I am trying to find a vba method to select the Range C5:(the last row used
in columnC) on the Ratios sheet, and copy and paste this range to Cells
F11-down on the Trades and Trades2 Sheets.

Please could someone provide a suggestion for this. I really do appreciate
the help

Regards,
Paul



PVANS

Copy range C5:Lastrow and paste to two different worksheets
 
Darn it, always pleasing when I manage to solve my own problem - but always
concerned I may have wasted someones time by posting here and then figuring
it out two seconds later :p:

this works perfectly in case someone else runs into a similar issue:

Sub percentages()

Dim LastrowA As Long
Set SrcSht = Sheets("Ratios")
Set DstSht = Sheets("Trades")
Set DstSht1 = Sheets("Trades2")

LastrowA = SrcSht.Cells(Cells.Rows.Count, "C").End(xlUp).Row
SrcSht.Range("C5:C" & LastrowA).Copy DstSht.Cells(11, 6)
SrcSht.Range("C5:C" & LastrowA).Copy DstSht1.Cells(11, 6)
End Sub

Thanks if u were investigating it for me though I do appreciate your time

"PVANS" wrote:

Good morning

I cannot seem to find a solution to this, and hope someone might be able to
help me.

I have three worksheets: Ratios, Trades, Trades2

I am trying to find a vba method to select the Range C5:(the last row used
in columnC) on the Ratios sheet, and copy and paste this range to Cells
F11-down on the Trades and Trades2 Sheets.

Please could someone provide a suggestion for this. I really do appreciate
the help

Regards,
Paul




All times are GMT +1. The time now is 11:45 PM.

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