Macro Help

Closed
futurepsych92 Posts 8 Registration date Monday January 4, 2016 Status Member Last seen February 19, 2016 - Jan 5, 2016 at 06:25 PM
futurepsych92 Posts 8 Registration date Monday January 4, 2016 Status Member Last seen February 19, 2016 - Jan 6, 2016 at 03:38 PM
Hello All,

In short, this is the issue I am facing:

I have created a macro to copy and paste data from one spreadsheet to another. Specifically, it takes Columns A and B from spreadsheet 1 and pastes them into Rows 1 and 2 of spreadsheet 2. However, I need to insert spaces so that there are three blank columns between each pasting. So, it would look something like this:

(Before)

122
222
122

(After)

1 2 2
1 2 2
1 2 2

I'm not sure if I am doing this correctly or if it would be better to somehow paste the information from each cell of Spreadsheet 1 into Spreadsheet 2 with spaces specified in-between each pasting.

I've attached my Marco. Please, help me.

Sub Assignment()


'ColumnA

Sheets("Sheet1").Select
Range("A2:A3303").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False


'ColumnB

Sheets("Sheet1").Select
Range("B2:B3303").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False

End Sub

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jan 6, 2016 at 12:13 PM
It is hard to see here, Could you add a screen shot of how it looks like and how you would like it to be
futurepsych92 Posts 8 Registration date Monday January 4, 2016 Status Member Last seen February 19, 2016
Jan 6, 2016 at 03:38 PM
I sent it in a private message because I wasn't sure how to get the screen shots to post here. However, when you answer, can you please respond to this thread so if anyone else has issues they can see it here? Thank you.
0