Report

Columns & Rows Help [Solved]

Ask a question futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Last answered on Jan 14, 2016 06:11PM
Hello all,

In short, here is what I need help doing:

I would like to take 15 items in one column and transfer them into a row in another spreadsheet. When the items are transferred, I would like for them to be pasted every 3 spaces. For example, if something is pasted in (1,3), then the next item will be pasted in (1,6).

Thank you so much for your help.
See more 
Helpful
+8
moins plus
Hi Futurepsych92,

Here you go:
Sub RunMe()
Dim x As Integer

Sheets("Sheet1").Select

For Each cell In Range("A1:A15")
    x = x + 3
    cell.Copy Sheets("Sheet2").Cells(1, x)
Next cell
End Sub 


Best regards,
Trowa
futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Jan 12, 2016 12:22PM
It works! Thank you so much!
Reply
futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Jan 12, 2016 04:38PM
Hi Trowa,

I have a quick question:


While the Macro works, I need for it to copy every four spaces starting from Cell (2,2).

So, it would be Cell (2,2), then (2,6), then (2,10)....


How would I alter this Macro to make it do this?
  • I apologize, I accidentally made a mistake in my original request for help. :(
Reply
Add comment
Helpful
+8
moins plus
Hi Futurepsych92,

Apology accepted :).


Here you go:
Sub RunMe()
Dim x As Integer

Sheets("Sheet1").Select
x = 2

For Each cell In Range("A1:A15")
    cell.Copy Sheets("Sheet2").Cells(2, x)
    x = x + 4
Next cell
End Sub


Best regards,
Trowa
futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Jan 14, 2016 06:11PM
Thanks!
Reply
Add comment

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!