Need macro code for copying some data from one sheet to another

PrinceOfCalcutta

New Member
Joined
Aug 4, 2014
Messages
2
hello, I need to copy some data from one sheet to another.

Suppose, Sheet A is having multiple column; out of that I need to copy column2, column6 and column8 data to another Sheet B to its column 1 ;column2; column3.
Please give me a detailed step to execute the code...as I am very new to this and trying to implement something similar to this problem.

Thanks in advance.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Here's the code I would paste inside a module in your workbook. If you need a quick intro to VBA you can click the link in my signature to learn how to add this code to your workbook file. Let me know if you still need help.

<font face=Calibri><SPAN style="color:#00007F">Sub</SPAN> CopyMacro()<br><br><SPAN style="color:#007F00">'Range to Copy in First Sheet</SPAN><br>  Worksheets("Sheet1").Range("B:B,F:F,H:H").Copy<br><br><SPAN style="color:#007F00">'Paste To Second Sheet</SPAN><br>    Worksheets("Sheet2").Range("A1").PasteSpecial<br>    <br><SPAN style="color:#007F00">'Clear Clipboard</SPAN><br>  Application.CutCopyMode = <SPAN style="color:#00007F">False</SPAN><br>  <br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0
Here's the code I would paste inside a module in your workbook. If you need a quick intro to VBA you can click the link in my signature to learn how to add this code to your workbook file. Let me know if you still need help.

Sub CopyMacro()

'Range to Copy in First Sheet
**Worksheets("Sheet1").Range("B:B,F:F,H:H").Copy

'Paste To Second Sheet
****Worksheets("Sheet2").Range("A1").PasteSpecial
****
'Clear Clipboard
**Application.CutCopyMode = False
**
End Sub


Thanks a ton!! I have visited your page...Can you please share your contact number to my mail so that I can discuss my requirement in detail..apu.chakrabarti@gmail.com
 
Upvote 0

Forum statistics

Threads
1,214,873
Messages
6,122,029
Members
449,061
Latest member
TheRealJoaquin

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