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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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,214,539
Messages
6,120,100
Members
448,944
Latest member
SarahSomethingExcel100

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