#1
|
|||
|
|||
Adding records to a custom sorted spreadsheet
I have a spreadsheet that has been presorted by another application. In the current spreadsheet state, it only lists one order per customer. For many customers, we have more than one order during the year which are in a separate spreadsheet. We are wanting to add in the other orders per customer without disturbing the current sort order as it is required for proper distribution of a letter to each customer. We will then be able to draft an order summary list for each customer from the full order list & print them in the presorted order.
So I was thinking about assigning a key field to the current customer list in its sort order and then copying the entire customer/order list into a second worksheet and then comparing the two worksheets via a column in this second worksheet & add the same key per customer. I would then sort this second worksheet by this key, which would result in all records per customer being in the same order as the current spreadsheet. Here are sample sheet images to illustrate - Spreadsheet that has no multiple orders per customer; in the sort that needs to stay in: Spreadsheet that has multiple orders per customer; in basic alphanumeric order by 'company': As you can see, all company names listed on first sheet are present on second at least once while several have multiple orders per company. Maybe there is a better way than my general logic. I'm looking for formulas/macros to get this sort of thing accomplished. Thanks for any help! John |
#2
|
||||
|
||||
Which is the logic for sorting in your first example ?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
Per USPS presort software. They sort them per zipcode & how many letters will fit in a 'tray', etc. I have no idea the algorithm they use.
|
#4
|
|||
|
|||
And here is image of what the spreadsheet would look like after inserting the additional records:
|
#5
|
|||
|
|||
This has been resolved by a posting on another site:
http://www.mrexcel.com/forum/showthr...40#post3076940 And I read the cross posting article linked in Pecoflyer's sig...I admit that I posted these simultaneously here and over there...sorry for the breach in protocol; it won't happen again. |
#6
|
||||
|
||||
It's not so much a breach in protocol than being polite with people who give you free help in their spare time.
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Groups to be sorted by start date in MS Project | Antares | Project | 3 | 12-09-2011 03:17 PM |
Need advice on category sorted e-mail merge | GeoB | Mail Merge | 3 | 09-08-2011 11:03 PM |
Adding comma to a custom type. | mcook | Excel | 1 | 08-13-2011 03:08 AM |
Lookup a value from non-sorted data | udea | Excel | 12 | 04-25-2011 04:34 AM |
Merge Doc skips records | eonelson | Excel | 11 | 01-30-2011 03:49 PM |