Report

Columns & Rows Help [Solved/Closed]

Ask a question futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Last answered on Jan 14, 2016 at 06:11 PM by futurepsych92
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
plus moins
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
Was this answer helpful?  
futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Jan 12, 2016 at 12:22 PM
It works! Thank you so much!
futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Jan 12, 2016 at 04:38 PM
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. :(
Helpful
+8
plus moins
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
Was this answer helpful?  
futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Jan 14, 2016 at 06:11 PM
Thanks!

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!