-2

How do I duplicate columns in sheet 2, Row G for example using input from cell in sheet 1 A4. The row and its contents should be copied by the number depicted in sheet 1 A4

Community
  • 1
  • 1
  • The best way to get help here is to first try something. If you get stuck, do some research, make an attempt at fixing things yourself, and only then ask a specific question about your attempts, showing what you have tried. Questions asking for complete solutions without demonstrating research effort usually get downvoted and closed. – Jean-François Corbett Mar 02 '15 at 13:56
  • Thank you and noted. I have had a few poor attempts, nothing has got close as yet. I will copy in what I have tried shortly – Duncan Clark Mar 03 '15 at 11:34

1 Answers1

0

When you use the following line you are referring to the sheet "Sheet1" in the active workbook.

Worksheets("Sheet1")

Make use of following commands in your VBA code to copy and paste data from cell of one worksheet to cell of another worksheet.

Worksheets("Sheet1").Range("A4").Select
Selection.Copy

Worksheets("Sheet2").Range("G4").Select
ActiveSheet.Paste

For how to refer cells from two different worksheets/workbooks have a look at this post How to compare columns from two different excel workbooks

Community
  • 1
  • 1
Tushar
  • 3,527
  • 9
  • 27
  • 49