Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2012, 10:06 AM
mauricioaglr mauricioaglr is offline Unique 3 char Alpha Numberic column Windows 7 64bit Unique 3 char Alpha Numberic column Office 2010 32bit
Novice
Unique 3 char Alpha Numberic column
 
Join Date: Mar 2012
Location: Los Angeles, CA
Posts: 4
mauricioaglr is on a distinguished road
Question Unique 3 char Alpha Numberic column

Hello, how can i create a unique 3 character alpha numberic column in excel 2010? I only have 3 characters to work with and I need to assign a unique code to over 5,000 inventory items. I have the items in Excel. Please help.
Reply With Quote
  #2  
Old 03-07-2012, 11:09 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Unique 3 char Alpha Numberic column Windows 7 32bit Unique 3 char Alpha Numberic column Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

The letters A-Z 3 times will give you 26^3 = 17576 unique codes.

In cell A1 =ROW()-1 and fill down to A17576
In cell B1 =MOD(A1,26)+65 and fill down to B17576
In cell C1 =INT(MOD(A1/26,26))+65 and fill down to C17576
In cell D1 =INT(MOD(A1/26/26,26))+65 and fill down to D17576
In cell E1 =CHAR(B1)&CHAR(C1)&CHAR(D1) and fill down to E17576

Column E gives you the unique alpha codes. Copy them and paste special to turn into constants. Then you can use them.
__________________
Colin

RAD Excel Blog
Reply With Quote
  #3  
Old 03-07-2012, 11:30 AM
mauricioaglr mauricioaglr is offline Unique 3 char Alpha Numberic column Windows 7 64bit Unique 3 char Alpha Numberic column Office 2010 32bit
Novice
Unique 3 char Alpha Numberic column
 
Join Date: Mar 2012
Location: Los Angeles, CA
Posts: 4
mauricioaglr is on a distinguished road
Smile

Thank you that worked for all Alpha, do you know of a formula for Alpha Numeric with the same 3 character contraint?
Reply With Quote
  #4  
Old 03-07-2012, 01:06 PM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Unique 3 char Alpha Numberic column Windows 7 32bit Unique 3 char Alpha Numberic column Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Yes, 0 to 9 gives 10 extra characters so 36^3 = 46656

A1 =ROW()-1 and fill down to A46656
B1 =MOD(A1,36)+IF(MOD(A1,36)<26,65,22)
C1 =INT(MOD(A1/36,36))+IF(INT(MOD(A1/36,36))<26,65,22)
D1 =INT(MOD(A1/36/36,36))+IF(INT(MOD(A1/36/36,36))<26,65,22)
E1 =CHAR(B1)&CHAR(C1)&CHAR(D1)


If case sensitive then you could also include lower case alpha which would then give you 238328 unique codes. I'll let you have a try at that one.
__________________
Colin

RAD Excel Blog
Reply With Quote
  #5  
Old 03-07-2012, 04:41 PM
mauricioaglr mauricioaglr is offline Unique 3 char Alpha Numberic column Windows 7 64bit Unique 3 char Alpha Numberic column Office 2010 32bit
Novice
Unique 3 char Alpha Numberic column
 
Join Date: Mar 2012
Location: Los Angeles, CA
Posts: 4
mauricioaglr is on a distinguished road
Thumbs up

Thank you.
Reply With Quote
  #6  
Old 03-07-2012, 04:55 PM
mauricioaglr mauricioaglr is offline Unique 3 char Alpha Numberic column Windows 7 64bit Unique 3 char Alpha Numberic column Office 2010 32bit
Novice
Unique 3 char Alpha Numberic column
 
Join Date: Mar 2012
Location: Los Angeles, CA
Posts: 4
mauricioaglr is on a distinguished road
Default

Can you tell me how I can sort the 3 character alpha numeric value, so they are in some logical order.
Reply With Quote
  #7  
Old 03-07-2012, 05:17 PM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Unique 3 char Alpha Numberic column Windows 7 32bit Unique 3 char Alpha Numberic column Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

What order do you want them in?
__________________
Colin

RAD Excel Blog
Reply With Quote
  #8  
Old 03-09-2012, 06:45 PM
macropod's Avatar
macropod macropod is offline Unique 3 char Alpha Numberic column Windows 7 64bit Unique 3 char Alpha Numberic column Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Actually, they're already in a logical order, but perhaps it wasn't apparent. The order was the reverse of what might be expected. A more conventional order in column E would be gained by:
=CHAR(D1)&CHAR(C1)&CHAR(B1)

Alternatively, you could put the whole catastrophe into a single formula:
=CHAR(MOD((ROW()-1)/1296,36)+22+(MOD((ROW()-1)/1296,36)<26)*43)&CHAR(MOD((ROW()-1)/36,36)+22+(MOD((ROW()-1)/36,36)<26)*43)&CHAR(MOD(ROW()-1,36)+(MOD(ROW()-1,36)<26)*43+22)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unique 3 char Alpha Numberic column Word 2007 TOC Section Number w/Alpha Prefix? Gwen Butler Office 2 09-29-2011 06:10 AM
Unique 3 char Alpha Numberic column Place pages in alpha order. Wskip49 Word 5 08-28-2011 07:54 PM
Unique 3 char Alpha Numberic column [How To] Generate Alpha Numeric Values in Excel 2010 stnicholas81 Excel 1 07-25-2011 01:31 AM
Document unique numbering / forms JamesF Word 0 11-22-2010 03:52 AM
Unique 3 char Alpha Numberic column creating unique numbers in excel bignick270 Excel 1 05-17-2009 05:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft