Cleaning up messy data from PDF report, need to match up purchase order numbers with supplier names on 2 separate rows

Tosborn

New Member
Joined
May 24, 2016
Messages
44
The messy data looks like the list in columns A & B (see image), the finished list needs to be like columns D&E. I'm cleaning up some very messy data with formulas on the spreadsheet up to this point but the solution could be with VBA also, I'm open to either.

So basically the purchase order number relates to the supplier below and the reverse is true also, the supplier name relates to the purchase order above.

The kicker is the supplier names repeated multiple times along the spreadsheet all the way down but always relate to the purchase order immediately in a non blank row above. That is, a supplier relates to multiple purchase orders but each purchase order only relates to one supplier.

Purchase order numbers are not repeated.

There is no mathematical consistency to the blank rows between PO & supplier.
 

Attachments

  • purchase orders.PNG
    purchase orders.PNG
    23.6 KB · Views: 19

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi Tosborn,

To simplify the formulae somewhat I've added a PO Row column.

Tosborn.xlsx
ABCDEFGH
1Messy data:Desired finished list:
2Purchase OrderSupplierPO RowPurchase OrderSupplier
318760-00118760-00Supplier 9
4618869-00Supplier 6
51018877-00Supplier 7
6Supplier 9   
7   
818869-00   
9Supplier 6   
10   
11Supplier 6   
1218877-00   
13
14
15Supplier 7
Sheet1
Cell Formulas
RangeFormula
F3:F12F3=IFERROR(AGGREGATE(15,6,ROW($A$3:$A$999)-ROW($A$2)/($A$3:$A$999<>""),ROW()-ROW($F$2)),"")
G3:G12G3=IF(F3="","",INDEX($A$3:$A$999,F3))
H3:H12H3=IFERROR(INDEX($B$3:$B$999,AGGREGATE(15,6,ROW($B$3:$B$999)-ROW($B$2)/(($B$3:$B$999<>"")*(ROW($B$3:$B$999)>F3-ROW($B$2))),ROW()-ROW($F$2))),"")
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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