Moving Rows overflow from Cols A&B to C&D help

ExcelN00b 2 Posts Thursday March 1, 2018Registration date March 2, 2018 Last seen - Mar 1, 2018 at 11:21 PM - Latest reply: ac3mark 10544 Posts Monday June 3, 2013Registration dateModeratorStatus September 25, 2018 Last seen
- Mar 2, 2018 at 06:36 PM
Hello,

I'm new to this macro business but I was able to create a sheet that functions 95% of how I want it to. My only problem now is that my sheet is 4 pages long, when it could very well be 2 if I can find a code to catch the page overflow and drop it into the C&D columns.

I have co-existing data in the A&B columns that I want to be caught and thrown to the C&D columns once it's hit the page break at the bottom of the document. For me it's data begins at Row 6 and ends around Row 56.

I'd like Row 56 - 112 to be automatically pulled from the A&B cols dropped into the C&D columns then 113 - 169 go onto Page 2 in the A&B columns and 170 - 223 in C&D columns and so forth.

Is this something I can easily do?

Currently I have everything listed in the A&B columns to run a macro code hiding all 0 or blank rows which works perfectly, but Ideally I need to move the overflow onto the same page into adjoining columns.

Thank you!

See more 

Your reply

3 replies

ac3mark 10544 Posts Monday June 3, 2013Registration dateModeratorStatus September 25, 2018 Last seen - Mar 2, 2018 at 02:58 PM
0
Thank you
take a look at this article. It has a front end you will not need, but the code will do exactly what you are asking, with some minor alterations. Post back if you get stuck with the code!

http://ccm.net/faq/54862-how-to-copy-data-from-one-excel-sheet-to-another-using-a-formula
ExcelN00b 2 Posts Thursday March 1, 2018Registration date March 2, 2018 Last seen - Mar 2, 2018 at 05:42 PM
Thank you Ac3 -- Sorting through this, I'm trying to keep the looped data on the same sheet which I've realized is going to be impossible given I have a macros compressing the data to hide all 0 / blank rows.

Once hidden, the looped data falls into the hidden rows once moved from A&B to C&D.

Is there a way to code the script to tell the looped data to ONLY fall onto the visible rows?
ac3mark 10544 Posts Monday June 3, 2013Registration dateModeratorStatus September 25, 2018 Last seen - Mar 2, 2018 at 06:36 PM
You can test on a logic of:
If .Rows(X).EntireRow.Hidden Then
Else

And loop through them.


Lets us know!
Respond to ac3mark