Merge Duplicate Grocery Order Data for Mailmerge

Copper Contributor

Hi,

 

I hope someone can help please 🙂

 

We are a not-for-profit organisation buying and selling locally produced fresh groceries, which we pack into boxes for daily home delivery and customer collection.

 

I have a daily order data export from our website. See link below for a dummy sample I've created.

 

https://www.dropbox.com/scl/fi/2khw8zcfme8lh766iabo8/GarethRobertsBoxDataSample.xlsx?dl=0&rlkey=bra2...

 

The data has an OrderID column. Each OrderID row has a core product, as indicated in the CoreProduct column, and then additional details in the AddOnProducts and BoxContents columns. In the dummy sample I have simplified these with dummy values, but typically these are comma separated values - see examples below:

 

OrderIDCoreProductAddOnProductsBoxContents
f134e2ad-8d93-4069-96c6-49addb036c59FRUIT BOX S1 x Bullion Fine Milk (63g), 1 x Large Seeded Millstone FB, 1 x Mini Henderson's Relish bottle, 1 x Organic Lemons x2, 1 x Seasonal Jam Jar Posy1kg x 032 Bananas, 940g x 034 Lanelate Orange, 480g x 036 Conference Pear
f134e2ad-8d93-4069-96c6-49addb036c59UK GROWN 1kg x 001b XL Potato, 200g x 004 Mushrooms, 1 ea x 010 Spring Greens, 300g x 012 Leek, 1 ea x 014 Cauliflower, 1 ea x 041 Salad, 200g x 043 Broccoli: Purple Sprouting

 

There are between 1, 2 and 3 OrderID rows which together make up each unique order.

 

I need to merge the mutiple CoreProduct, AddOnProducts and BoxContents values across each unique OrderID value.

 

I will then use mailmerge to insert the merged data into a Word document to produce an order packing list / check sheet with all the CoreProduct, AddOnProducts and BoxContents values for each unique OrderID.

 

If the final document could layout the unique OrderID at the top, then all the relevant CoreProduct, AddOnProducts and BoxContents values beneath, maybe with each CSV on a new line that would be amazing. This will allow our box packers to check off each item in turn as they are packed.

 

I hope that makes sense. Happy to clarify anything.

 

Many thanks for any help offered, Gareth

 

Gareth Roberts

Regather (Sheffield, UK)

2 Replies

@GarethRoberts 

It looks like you might find Graham Mayor's free add-in for Word useful:

Mail Merge 'Many-to-One'