Copy paste problem

Stono

New Member
Joined
Feb 25, 2002
Messages
14
How could you copy three cells in the same row to a different sheet?
Ex.. I is the row count, and I want to copy the cell (I,”B) and Cell (I,”C”) And Cell (I,”M”)

For i = Cells (Rows. Count, "M"). End (xlUp). Row To 1 Step –1

I did that but it did not work??!!
Cells(i,"B"),Cells(i,"C"),Cells(i,"M").copy

Please help
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Sub Copytest()
Dim i As Double

For i = Cells(Rows.Count, "M").End(xlUp).Row To 1 Step -1
Application.Union(Cells(i, "B"), Cells(i, "C"), Cells(i, "M")).Copy Cells(i, "N")
Next

End Sub

HTH

Ivan
 
Upvote 0
That should be.......

Sub Copytest()
Dim i As Double

For i = Cells(Rows.Count, "M").End(xlUp).Row To 1 Step -1
Application.Union(Cells(i, "B"), Cells(i, "C"), Cells(i, "M")).Copy Sheets("Sheet2").Cells(i, "A")
Next

End Sub


Ivan
 
Upvote 0

Forum statistics

Threads
1,223,355
Messages
6,171,615
Members
452,411
Latest member
sprichwort

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