Data in unuseable format

cSciFiChick

New Member
Joined
Jul 31, 2014
Messages
42
Hey guys I am trying to compare delivery shipping opens for different zip code pair and the ata is coming out in a format that I really can not use. I want to be able to see the zip code pair and all services that are available with all the other info.

Order #Svc CodeSvc DescGuar CodePU DatePU TimeDlv DateDlv TimeDlv DayBus Trns DaysTot Trns DaysHolidaysDelay DaysRest DaysCust Ctr CutoffSat DlvSat Dlv Disclaim for up to 10 ServicesSvc CodeSvc Desc
1Early AMMorning DelY04/18/1805:00:00 PM04/20/1807:00:00 PMTue11xxx05:00:00 PMyxNext DayNext Day

<colgroup><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"><col width="107"></colgroup> <tbody>
</tbody>


So the order is the zip code pair and I can potencially have thousands of thes. So as you see it does the Svc Code to Sat Dlv Disclaim for up to 10 services. Then it lists the next Svc Code. with the same sixteen columns of data. There are 10 possible services so those sixteen columns can be repeated 10 times. Anyway I would love a macro or something to move the data into a single sixteen columns and have it go down instead of across. For each different zip code pair. I can not figure out the best solution, a macro formulas..I just need help please.

Here is the google doc to show you what it looks like.

https://docs.google.com/spreadsheets/d/1WuHYu3lPukhkYEFj-ASODUIMBdPyraXW_6VV8f8m63Q/edit?usp=sharing
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
How about
Code:
Sub SplitDatatoRows()
   Dim rws As Long
   Dim i As Long, j As Long, k As Long
   
   For i = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
      rws = (Cells(i, Columns.Count).End(xlToLeft).Column - 1) / 16
      If rws > 1 Then
         j = 18
         Rows(i + 1).Resize(rws - 1).Insert
         Range("A" & i).Resize(rws).FillDown
         For k = 1 To rws - 1
            Cells(i, j).Resize(, 16).Copy Range("b" & k + i)
            j = j + 16
         Next k
      End If
   Next i
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,056
Messages
6,122,907
Members
449,096
Latest member
dbomb1414

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