Creating a unqiue list

Status
Not open for further replies.

Branagorn

New Member
Joined
Apr 13, 2015
Messages
41
Hello there,

Please forgive me if you believe the answer to the following is already on the site somewhere, I've been doing some frantic googling but to no avail so far.

Im trying to create a tool that will take two bill of materials, an old and up to date version. The only user operation I want to have is the copying and pasting of this data. The spreadsheet has a dashboard that will show the comparison between the two i.e whats been added, what has been removed. The old, and new data will be stored on separate sheets.

The data has many fields and duplicate parts, but by concatenating 3 fields it can create a unique ID which can be compared across both bill of materials, if the unique ID is on both sheets, it has been carried across, if it is on one but not the other, it is either a new, or removed part.


So far I have a lot of the sheet worked out, but what I cannot do without manual handling. This manual handling is creating the master list of IDs, where I c&p the old IDS onto a new sheet, then the new ones underneath that, and then use the remove duplicates function. This list then, is every single part that was or is currently needed. The list that all the calculations are based on.

For reference the data looks like this,
[TABLE="width: 145"]
<tbody>[TR]
[TD]511VSB2200770000356[/TD]
[/TR]
[TR]
[TD]511VSB2200970000359[/TD]
[/TR]
[TR]
[TD]511VSB7202470000440[/TD]
[/TR]
[TR]
[TD]511VSB7202370000440[/TD]
[/TR]
[TR]
[TD]511VSB3202370000441[/TD]
[/TR]
[TR]
[TD]511VSB6200370000442[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]

I'd like it if somebody could tell me if this absolutely cannot be done without VBA or pivot tables, then I'll give in and have to accept that.
If it does need VBA (perhaps the concatenating can be done within that also), then I'm afraid I might need a bit of baby spoon feeding, ive done it all with formulas so far.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
** The IDs look like that. to further illustrate the old and new data

old bill of materials

[TABLE="width: 500"]
<tbody>[TR]
[TD]Fitting Number
[/TD]
[TD]Library Part Number
[/TD]
[TD]Location
[/TD]
[TD]Part Description
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 99"]
<tbody>[TR]
[TD]VSB22007
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 133"]
<tbody>[TR]
[TD="align: right"]70000356
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]corner 1
[/TD]
[TD]sofa
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 99"]
<tbody>[TR]
[TD]VSB22009
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 133"]
<tbody>[TR]
[TD="align: right"]70000356
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]corner 2
[/TD]
[TD]sofa
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 99"]
<tbody>[TR]
[TD]VSB32023
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 133"]
<tbody>[TR]
[TD="align: right"]70001444
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]middle
[/TD]
[TD]chair
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 99"]
<tbody>[TR]
[TD]VSB32023
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 133"]
<tbody>[TR]
[TD="align: right"]70002081
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]middle
[/TD]
[TD]table
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
so you can see there can be the same parts used in different locations, so to make sure we are comparing the exact same part/location these two values are concatenated together to create its unqiue ID.


New Bill

[TABLE="width: 500"]
<tbody>[TR]
[TD]Fitting Number
[/TD]
[TD]Library Part Number
[/TD]
[TD]Location
[/TD]
[TD]Part Description
[/TD]
[/TR]
[TR]
[TD]VSB22007
[/TD]
[TD]70000356
[/TD]
[TD]corner 1
[/TD]
[TD]sofa
[/TD]
[/TR]
[TR]
[TD]VSB32023
[/TD]
[TD]70001444
[/TD]
[TD]middle
[/TD]
[TD]chair
[/TD]
[/TR]
[TR]
[TD]VSB12345
[/TD]
[TD]70001234
[/TD]
[TD]upstairs
[/TD]
[TD]bed
[/TD]
[/TR]
[TR]
[TD]VBS54321
[/TD]
[TD]70004321
[/TD]
[TD]upstairs
[/TD]
[TD]chair
[/TD]
[/TR]
</tbody>[/TABLE]

So you can see that on the new bill, we will have lost the corner 2 sofa and the middle table, but gained two items upstairs.


The Dashboard I am creating looks like this.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Old Bill ID
[/TD]
[TD]Master ID List
[/TD]
[TD]New Bill ID
[/TD]
[TD]Location
[/TD]
[TD]Part Description
[/TD]
[/TR]
[TR]
[TD]VSB2200770000356
[/TD]
[TD]VSB2200770000356
[/TD]
[TD]VSB2200770000356
[/TD]
[TD]corner 1
[/TD]
[TD]sofa
[/TD]
[/TR]
[TR]
[TD]VSB2200970000356
[/TD]
[TD]VSB2200970000356
[/TD]
[TD][/TD]
[TD]corner 2
[/TD]
[TD]sofa
[/TD]
[/TR]
[TR]
[TD]VSB3202370002081
[/TD]
[TD]VSB3202370002081
[/TD]
[TD][/TD]
[TD]middle
[/TD]
[TD]table
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]VSB1234570001234
[/TD]
[TD]VSB1234570001234
[/TD]
[TD]upstairs
[/TD]
[TD]bed
[/TD]
[/TR]
[TR]
[TD]VSB3202370001444
[/TD]
[TD]VSB3202370001444
[/TD]
[TD]VSB3202370001444
[/TD]
[TD]middle
[/TD]
[TD]chair
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]VBS5432170004321
[/TD]
[TD]VBS5432170004321
[/TD]
[TD]upstairs
[/TD]
[TD]chair
[/TD]
[/TR]
</tbody>[/TABLE]


So from this its easy to use formulas, to count which cells have values across all 3 IDs (a constant part), which ones only appear in the old and master list (a removed part), or the new and master list (a completely new part).


Also notice how the fitting numbers and part numbers for the new items can be smaller than the old parts, so I like to have the master ID list ordered by the library part number (or =RIGHT(MASTERIDLIST,8).
 
Upvote 0
not the most elegant way by far, have a look if this works for you.

Col F shows 2 if appear on both old and new, 1 on old and New on new.


Excel 2013/2016
ABCDEF
1Old Bill IDMaster ID ListNew Bill IDLocationPart Description
2VSB2200770000356VSB2200770000356VSB2200770000356corner 1sofa2
3VSB2200970000356VSB2200970000356corner 2sofa1
4VSB3202370002081VSB3202370002081middletable1
5VSB1234570001234VSB1234570001234upstairsbedNew
6VSB3202370001444VSB3202370001444VSB3202370001444middlechair2
7VBS5432170004321VBS5432170004321upstairschairNew
Sheet1
Cell Formulas
RangeFormula
F2=IF(ISBLANK(A2),IF(ISNUMBER(SEARCH(C2,$B:$B)),"New","x"),SEARCH(A2,B:B)+IFERROR(SEARCH(A2,C:C),0))
 
Upvote 0
Hello Alan, thank you for your suggestion.

I have to apologise for my complicated/difficult wording of my post. It is not the analysis of the two bills I am having trouble with, but the creation of the 'Dashboard'.

I need some how to create the Master ID list, and order it by the last 8 characters. At the moment what I am doing, (which I don't want the user to have to do) is.

1. Creating IDs (by concatenating the fitting number an library part number) for both the old and new bill of materials.
2. Merging the two lists to form a 'Master ID List'
3. Removing duplicates from the Master ID List (there will be plenty of parts that show in both Bills, making the list longer than it needs to be)

The next steps help form the dashboard.

4. Sorting the Old list of IDs to show alongside the master ID list (where they exist).
5. Sorting the New list of IDs to show alongside the master ID list (where they exist).

So I think my request could be broken into two, steps 1-3, then 4&5
 
Upvote 0
Re-posted here: https://www.mrexcel.com/forum/excel-questions/1030188-vba-needed.html

In the future, please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

I am locking this original this time, instead of deleting your new post.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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