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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Chris Macro

Well-known Member
Joined
Nov 2, 2011
Messages
1,343
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>
 

PrinceOfCalcutta

New Member
Joined
Aug 4, 2014
Messages
2
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
 

Watch MrExcel Video

Forum statistics

Threads
1,132,671
Messages
5,654,659
Members
418,146
Latest member
Shnn028

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
Top