Macro to copy contents of a column over to the next column

June 3, 2013 at 16:41:43
Specs: Windows 7
In excel, I can have roughly 2000 lines of information in a column and I want to split it up and copy over to the next row and keep going until the data runs out.

I would like it to be able to have a pop up box that asks how many lines to go down.

Any help would be appreciated.


See More: Macro to copy contents of a column over to the next column

Report •


#1
June 3, 2013 at 17:12:23
Your subject line says "...Copy Contents Of A Column Over To The Next Column" but the body of your post says "...I want to split it up and copy over to the next row..."

Which is it, copy it to the next column or copy it to the next row?

Whichever it is, what do you mean by split it up?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
June 4, 2013 at 06:17:27
I'm sorry, I should have put a before and after example. Here is what I have:

A
Adeline Dr 12
Ailsa Dr 5
Aleah Cres 11
Alice Ave RR1
Amberview Dr 7
Annamaria Dr 4
Annshiela Dr 13
Arlington Dr 6
Ashdale Rd 2
Atherton Cres 7
Aynsley Pl 4


And this is what I would like it to look like:

A A
Adeline Dr 12 Annshiela Dr 13
Ailsa Dr 5 Arlington Dr 6
Aleah Cres 11 Ashdale Rd 2
Alice Ave RR1 Atherton Cres 7
Amberview Dr 7 Aynsley Pl 4
Annamaria Dr 4


What I would like to do, is not copy but move every so many lines..sometimes it could be every 50th line, 55, etc.. until the whole column of info runs out, to end. Also as the columns are being moved over, the line above should reflect the first alpha letter of the next column if that is possible.

Thank you for your help.


Report •

#3
June 4, 2013 at 08:03:01
First a posting tip:

It does not appear that you followed the instructions at the bottom of my response related to posting data in this forum. Please click on the blue line at the bottom of this post and read the instructions found via that link before posting any more example data in this forum.

re: "sometimes it could be every 50th line, 55, etc"

What will determine how many lines to move?

re: the line above should reflect the first alpha letter of the next column

What if the "next column" contains data that starts with different letters?

General questions:

Your example output has nothing next to Annamaria Dr 4. What causes that to happen and how would the code know not to move anything into that cell?

If you are moving every 50 or 55 row from Column A to Column B, what happens to the rows that the data was moved from? Are those rows deleted so that Column A becomes shorter?

Please remember that we can't see your workbook from where we are sitting nor can we read minds. You know exactly what your data looks like and what you want to do with it. You need to be very clear about what you are trying to acomplish so that we can offer a solution that will work.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question