macro to copy specific columns of selected rows to another sheet

acmehra

New Member
Joined
Jan 20, 2018
Messages
16
Hi All ,

I am a beginner in vb. I want to copy data of rows selected by user to another sheet . But data from column A, B and E of the source sheet should be copied from the selected rows.

I am able to write the code which can copy whole row to destination sheet but I need help to copy data from specific columns only. Please help.

Below is my current code :

HTML:
Sub btnS()
Selection.Copy Sheets("destination").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)Worksheets("destination").Activate
   End Sub
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,353
Messages
6,124,462
Members
449,163
Latest member
kshealy

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