Converting Data listed horizontally to vertical listing

excelnovice_1

New Member
Joined
Nov 2, 2016
Messages
3
Hello, I have PDFs that I converted to excel. The PDFs contain a Subcontractor, General Contractor, and then every invoice#, invoice date, and invoice amount that that subcontractor has paid. When I convert it to excel the data all gets listed in one row. I would like it to be listed vertically so that for every invoice#/date/amount, there is a new row with the subcontractor and prime listed.

Below is how the data is originally converted.

SubcontractorGeneral ContractorInvoice_1Date_1Amount_1Invoice_2Date_2Amount_2Invoice_3Date_3Amount_3
S1GC212310/10/161001241017/16500
S2GC4ABC10/11/161,000
S1GC123A9/6/161,50024A10/4/161,75025A10/16/162,000
S3GC1INV458/3/16500INV479/1/16789
S1GC3XYZ10/21/161,000ZYX10/27/161,200
S3GC467899/19/165067889/1/162,400

<tbody>
</tbody>


Below is how I would like the data to be presented.

SubcontractorGeneral ContractorInvoice #DateAmount
S1GC212310/10/16100
S1GC212410/17/16500
S2GC4ABC10/11/161,000
S1GC123A9/6/161,500
S1GC124A10/4/161,750
S1GC125A10/16/162,000
S3GC1INV458/3/16500
S3GC1INV479/1/16789
S1GC3XYZ10/21/161,000
S1GC3ZYX10/27/161,200
S3GC467899/19/1650
S3GC467889/1/162,400

<tbody>
</tbody>

Is there anyway to convert this data in excel, access or ACL analytics?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try this for results on sheet 2.
Code:
[COLOR="Navy"]Sub[/COLOR] MG03Nov50
[COLOR="Navy"]Dim[/COLOR] Lst [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Set[/COLOR] Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp))
ReDim Ray(1 To 5, 1 To 1)
Ray(1, 1) = "Subcontractor": Ray(2, 1) = "General Contractor"
Ray(3, 1) = "Invoice #": Ray(4, 1) = "Date": Ray(5, 1) = "Amount"
c = 1
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
    Lst = Cells(Dn.Row, Columns.Count).End(xlToLeft).Column
        [COLOR="Navy"]For[/COLOR] Ac = 3 To Lst [COLOR="Navy"]Step[/COLOR] 3
            c = c + 1
            [COLOR="Navy"]If[/COLOR] c > UBound(Ray, 2) [COLOR="Navy"]Then[/COLOR] ReDim Preserve Ray(1 To 5, 1 To c)
            Ray(1, c) = Dn.Value: Ray(2, c) = Dn.Offset(, 1).Value
            Ray(3, c) = Dn(, Ac): Ray(4, c) = Dn(, Ac + 1): Ray(5, c) = Dn(, Ac + 2)
        [COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]With[/COLOR] Sheets("Sheet12").Range("A1").Resize(c, 5)
    .Value = Application.Transpose(Ray)
    .Columns.AutoFit
    .Borders.Weight = 2
[COLOR="Navy"]End[/COLOR] With
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,582
Members
449,089
Latest member
Motoracer88

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