Take one column of data and make it into multiple- Excel

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
822
Office Version
  1. 365
Platform
  1. Windows
In column A I have 2985 rows of data. I would like to take it and make it into multiple columns so i can print off a couple pages instead of 30.. Any suggestions
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also how many rows/columns do you want to end up with?
 
Upvote 0
Thanks I would like about 40 rows with as many rows as it takes..
 
Upvote 0
Sorry about that. 40 rows with as many columns as it takes. Need data to do from left to right
 
Upvote 0
Ok, how about
Excel Formula:
=WRAPCOLS(A1:A2985,40)
 
Upvote 0
Solution
Forgot to include the last argument
Excel Formula:
=WRAPCOLS(A1:A2985,40,"")
This will prevent the #N/A errors at the end of the data.
 
Upvote 0
run: Breakup2Ncols
tho you can , in print preview, set how to fit to page, and print 2 sided

Code:
Public Sub Breakup2Ncols()
Dim iTotRecs As Long, iCols As Long, iMaxRow As Long, c As Long, iSrcRow As Long, iTargRow As Long
Dim wsSrc As Worksheet, wsTarg As Worksheet
Dim vVal, vRet

Set wsSrc = ActiveSheet

vRet = InputBox("How many rows per page?", "Rows to use", 70)

If vRet = "" Then Exit Sub
If Not IsNumeric(vRet) Then Exit Sub

iMaxRow = Val(vRet)

Range("a1").Select
Selection.End(xlDown).Select
iTotRecs = ActiveCell.Row
Range("a1").Select
'iMaxRow = r \ iCols    'rows/col
iCols = iTotRecs \ iMaxRow

  'results sheet
Sheets.Add
Set wsTarg = ActiveSheet

iSrcRow = 1
wsSrc.Activate
While iSrcRow <= iTotRecs

   For c = 1 To iCols + 1
       'wsTarg.Cells(1, c).Select
       iTargRow = 1
       
       While iTargRow <= iMaxRow
          vVal = wsSrc.Cells(iSrcRow, 1).Value
          wsTarg.Cells(iTargRow, c).Value = vVal
          iTargRow = iTargRow + 1
          iSrcRow = iSrcRow + 1
       Wend
       vVal = wsSrc.Cells(iSrcRow, 1).Value
       iTargRow = 1
       wsTarg.Cells(iTargRow, c + 1).Value = vVal
   Next
   
Wend
wsTarg.Activate
Set wsSrc = Nothing
Set wsTarg = Nothing
MsgBox "Done"
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,421
Messages
6,124,806
Members
449,191
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top