First Row as a column

anillinda

New Member
Joined
Apr 20, 2012
Messages
48
I have the following data :

Vendor name as the first row
The second row has the invoice number, amount and the amount outstanding.
The third, fourth and so on have the invoice numbers and then there is another vendor and invoice numbers.

I need to put the vendor number against the invoice number.
I would appreciate the help.
Ram01 RAM Enterprises
Invoice#02021253010/15/2019
Invoice#02022268011/20/2019

Thanks
Neal
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
something like this?

InvoiceAmountDateInvoiceAmountDate
Ram01 RAM EnterprisesRam01 RAM Enterprises
Invoice#02021253015/10/2019#02021Invoice253015/10/2019
Invoice#02022268020/11/2019#02022Invoice268020/11/2019
Company ABCCompany ABC
Invoice#1004300025/12/2020#1004Invoice300025/12/2020
Invoice#1005400026/12/2020#1005Invoice400026/12/2020
 
Upvote 0
I want the data to look like as follows:
Ram01 RAM EnterprisesInvoice#2021253015/10/2019
Ram01 RAM EnterprisesInvoice#2022268002/11/2019
ABC01 ABC CorporationInvoice#10589523578002/15/2019
ABC01 ABC CorporationInvoice#10589835698703/15/2019
 
Upvote 0
I assume it will be correct
InvoiceAmountDateVendorInvoiceAmountDate
Ram01 RAM EnterprisesRam01 RAM EnterprisesInvoice#02021253015/10/2019
Invoice#02021253015/10/2019Ram01 RAM EnterprisesInvoice#02022268020/11/2019
Invoice#02022268020/11/2019Company ABCInvoice#1004300025/12/2020
Company ABCCompany ABCInvoice#1005400026/12/2020
Invoice#1004300025/12/2020
Invoice#1005400026/12/2020

so try
Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    IF = Table.AddColumn(Source, "Vendor", each if [Amount] = null then [Invoice] else null),
    FillD = Table.FillDown(IF,{"Vendor"}),
    Filter = Table.SelectRows(FillD, each ([Amount] <> null)),
    TSC = Table.SelectColumns(Filter,{"Vendor", "Invoice", "Amount", "Date"}),
    Type = Table.TransformColumnTypes(TSC,{{"Date", type date}})
in
    Type
 
Upvote 0
or more flexible
Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    IF = Table.AddColumn(Source, "Vendor", each if not Text.Contains([Invoice], "Invoice") then [Invoice] else null),
    FillD = Table.FillDown(IF,{"Vendor"}),
    Filter = Table.SelectRows(FillD, each Text.Contains([Invoice], "Invoice")),
    TSC = Table.SelectColumns(Filter,{"Vendor", "Invoice", "Amount", "Date"}),
    Type = Table.TransformColumnTypes(TSC,{{"Date", type date}})
in
    Type
 
Upvote 0
look at the headers in post#5 (blue table: source, green table: result)
you cannot copy/paste "as is" but adapt M to your header names
 
Upvote 0
NumberDateOn HoldTotal
Currency:
AME03 AMERICAN EXPRESS
ER_AMEX_2019-2020_7
2/25/2020​
N
13,691.40​
ER_AMEX_2019-2020_8
3/25/2020​
N
6,360.78​
20,052.18​
6,725.00​
0.00​
0.00​
AMG01 AMERIGAS PROPANE
804635113
3/30/2020​
N
179.25​
179.25​
179.25​
0.00​
0.00​
 
Upvote 0
NumberDateOn HoldTotal
Currency:
AME03 AMERICAN EXPRESS
ER_AMEX_2019-2020_7
2/25/2020​
N
13,691.40​
ER_AMEX_2019-2020_8
3/25/2020​
N
6,360.78​
20,052.18​
6,725.00​
0.00​
0.00​
AMG01 AMERIGAS PROPANE
804635113
3/30/2020​
N
179.25​
179.25​
179.25​
0.00​
0.00​
 
Upvote 0

Forum statistics

Threads
1,223,794
Messages
6,174,643
Members
452,575
Latest member
Fstick546

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