Formula that will generate unique ID based on text data in multiple columns

Monologue

New Member
Joined
Jun 28, 2017
Messages
10
Hi all,



We have a document in work that is used to record design tasks. Each new job can have multiple lines in the document but should all share one unique ID. The document contains about 20 columns but only the below 5 will impact the data that should create the Job ID. Currently, the 'JOB ID' column uses a unique number created by another department. We want to get away from that and use our own number, for numerous reasons. The current system does not take in to account any of the below data, which is what we want to do with the new system. The job id should follow the following structure: 'DATE ASSIGNED' + 'BUYER' + 'SUPPLIER', where 'HANDLER' and 'SUPPLIER' are represented by a code that should be located in a second sheet called 'Lists'. The code for the handler should take the first and last letter of the name and the supplier code should simply be a sequential number based on the supplier's position in the column on the second sheet 'Lists'. So in the first example, the '0138' at the end simply refers the fact that this particular supplier is number 138 in the list. Is what I have described here possible and have you any ideas as to what the formula would look like? I have a column next to the 'SUPPLIER' column in the 'Lists' sheet that contains the sequential numbers. Many thanks for reading and if you need any further explanations / information, please let me know!



STATUSJOB IDDATE ASSIGNEDSUPPLIERHANDLER
Assigned200617MS013820 June 2017ABC 01Marcus
In Progress280617ML025028 June 2017ABC 02Michael
In Progress280617AA011128 June 2017ABC 03Angela
Completed100617ID013810 June 2017ABC 01Ingrid
Assigned050517ML00635 June 2017ABC 04Michael

<tbody>
</tbody>
 
Re: Help with formula that will generate unique ID based on text data in multiple columns

Hi,

Is there anyway I can upload/attach a test document to show the issue I'm having with this formula? I think it's probably a simple solution (for someone that knows what they're doing) but I can't figure it out.

Thanks!
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Re: Help with formula that will generate unique ID based on text data in multiple columns

Hi all,

I'm sorry to bump this but has anyone else got any ideas on how to solve my problem? Oldbrewer's formula does not seem to work and I need a solution on this as soon as possible!

Thanks,
M.
 
Upvote 0
Re: Help with formula that will generate unique ID based on text data in multiple columns

my formula worked on my spreadsheet - put up a google sheets link for us all to look at please
 
Upvote 0
Re: Help with formula that will generate unique ID based on text data in multiple columns

StatusJob no.Date RequestedWeekMonthAssigned toDate AssignedSupplierSupplier_codeCDECountOfCDESupp. Ref.PLUBarcodeBrandDescriptionDeliverablesDimensionsDesign CategoryBuyer
Completed1/5/17MsGigga18/01/20173Jan-17Emmet1/25/2017GiggaGiggDate AssignedSupplierBuyer H-382123456 StabiloBICYCLE REAR LIGHTBarcodeTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/25/2017GiggaGigg H-383123457 StabiloBICYCLE REAR LIGHTBarcodeTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/25/2017GiggaGigg H-384123458 StabiloBICYCLE REAR LIGHTBarcodeTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/25/2017GiggaGigg H-385123459 StabiloBICYCLE REAR LIGHTBarcodeTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/25/2017GiggaGigg H-386123460 StabiloBICYCLE REAR LIGHTBarcodeTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/25/2017GiggaGigg H-387123461 StabiloBICYCLE REAR LIGHTBarcodeTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/25/2017GiggaGigg H-388123462 StabiloBICYCLE REAR LIGHTBarcodeTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/25/2017GiggaGigg H-389123463 StabiloBICYCLE REAR LIGHTBarcodeTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/18/2017GiggaGigg H-390123464 StabiloBICYCLE REAR LIGHTBack stampTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/18/2017GiggaGigg H-391123465 StabiloBICYCLE REAR LIGHTBack stampTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/18/2017GiggaGigg H-392123466 StabiloBICYCLE REAR LIGHTBack stampTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/18/2017GiggaGigg H-393123467 StabiloBICYCLE REAR LIGHTBack stampTBC1: 30min or lessMarcus
Completed 18/01/20173Jan-17Emmet1/18/2017GiggaGigg H-394123468 StabiloBICYCLE REAR LIGHTBack stampTBC1: 30min or lessMarcus
B3 should be
=LEFT(TEXT(G2,"dd-mm-yy"),2)&MID(TEXT(G2,"dd-mm-yy"),4,2)&RIGHT(TEXT(G2,"dd-mm-yy"),2)&LEFT(T2,1)&RIGHT(T2,1)&H2&K2

<colgroup><col><col><col><col><col><col span="16"></colgroup><tbody>
</tbody>
 
Upvote 0
Re: Help with formula that will generate unique ID based on text data in multiple columns

B2 should be
 
Upvote 0
Re: Help with formula that will generate unique ID based on text data in multiple columns

StatusJob no.Date RequestedWeekMonthAssigned toDate Assigned
Completed1/5/1718/01/20173Jan-17Emmet1/25/2017
considering data in G2 in format m/dd/yyyy
=text(g2,"dd/mm/yyy") =
1/25/2017
this proves that G2 is entered as text
change all your dates to real dates
or you will need complex formulas to detect if month is single or double digit

<colgroup><col width="64" span="10" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
Re: Help with formula that will generate unique ID based on text data in multiple columns

Hi,

Many thanks for all your help - much appreciated! I was able to get someone else to look at it and this is the formula they produced:

<!--StartFragment-->=TEXT(G2,"DDMMYY")&UPPER(LEFT(Q2,1)&RIGHT(Q2,1))&TEXT(MATCH(H2,H:H,FALSE),"0000")

The formula seems to work fine within my document, without the need to change my date formats. I'm putting it up here, in the case someone else is looking for a similar solution.

Thanks,
M.

<!--EndFragment-->
 
Upvote 0

Forum statistics

Threads
1,215,212
Messages
6,123,655
Members
449,113
Latest member
Hochanz

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