multiple copy sub

kl2190

New Member
Joined
Oct 28, 2010
Messages
15
hi all,

having trouble with the following. the 1st copy works but the 2nd does nothing.

Sub New_Button_Click()
LastrowSL = Worksheets("Saw List").UsedRange.Rows.Count


If Range("A3").Value = "XO" Then
Worksheets("Formulas").Range("A2:A10").Copy _
Destination:=Worksheets("Saw List").Range("B" & LastrowSL + 1)

Lastcell = Worksheets("Formulas").Cells(Rows.Count, "C").End(xlUp).Row
Worksheets("Formulas").Range("E2").Copy _
Destination:=Worksheets("Saw List").Range("C" & Lastcell + 1)

End If

End Sub


i also need to to copy down what i just pasted into the last used cell in coloum C down to the last used row in that sheet.

any help is appreciated
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Shouldn't
Lastcell = Worksheets("Formulas").Cells(Rows.Count, "C").End(xlUp).Row
perhaps be
Lastcell = Worksheets("Saw List").Cells(Rows.Count, "C").End(xlUp).Row
 
Upvote 0
your right i had that wrong. blonde moment sorry ppl. what about to copy that down to the last used row on that sheet
 
Upvote 0
Try changing your existing
Code:
Worksheets("Formulas").Range("E2").Copy Destination:=Worksheets("Saw List").Range("C" & LastCell + 1)
to
Code:
Worksheets("Formulas").Range("E2").Copy Destination:=Worksheets("Saw List").Range("C" & LastCell + 1 & ":C" & LastRowSL)



your right
Is it?
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top