Macro Help

Closed
futurepsych92 Posts 8 Registration date Monday 4 January 2016 Status Member Last seen 19 February 2016 - 5 Jan 2016 à 18:25
futurepsych92 Posts 8 Registration date Monday 4 January 2016 Status Member Last seen 19 February 2016 - 6 Jan 2016 à 15:38
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 28 January 2010 Status Contributor Last seen 5 May 2022 766
6 Jan 2016 à 12:13
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 4 January 2016 Status Member Last seen 19 February 2016
6 Jan 2016 à 15:38
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.