+ Reply to Thread
Results 1 to 9 of 9

Assigning IDs to names - is this possible?

  1. #1
    Registered User
    Join Date
    09-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    60

    Assigning IDs to names - is this possible?

    Hi.
    I have a column with names (repeated names by month).
    there are about 3700 of them spread over 12 month. so it's about 300 names per month.

    is it possible to assign an ID (a number) to specific names?

    so let's say - John Smith will have ID 1 (for example), and will always get this ID?

    Thanks!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Assigning IDs to names - is this possible?

    Hi Ben,

    This seams like an easy VLookup formula where you lookup a name and hang an ID on it from a lookup table.

    Supply a sample file and we can show you how this works.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    09-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    60

    Re: Assigning IDs to names - is this possible?

    Thx
    I cannot upload the file because I am not allowed to ):

    it is simple:


    File Name Date Month First Last ID (Fx) First, Last, Capitalized Sum Address 1 Address 2 City (Fx) City, Capitalized State Zip

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Assigning IDs to names - is this possible?

    OK,
    See my example of VLookup attached...
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Assigning IDs to names - is this possible?

    Hopefully martin has what you need, but my read was that you wanted to create unique ID's for each name? Is so, then, if your data is laied out like this, here are 2 different options...
    A
    B
    C
    1
    repeat Unique
    2
    Name1
    1
    1
    3
    name2
    2
    2
    4
    name3
    3
    3
    5
    name1
    1
    6
    name2
    2
    7
    name4
    4
    4
    8
    name6
    5
    5
    9
    name3
    3


    Column B uses this...
    =IF(COUNTIF($A$2:A2,A2)>1,VLOOKUP(A2,$A1:B$2,2,0),MAX($B$1:B1)+1)
    It repeats numbers from above, if the name is repeated (see name1)

    Column C usaes this...
    =IF(COUNTIF($A$2:A2,A2)>1,"",MAX($B$1:B1)+1)
    This leave a blank if the name has been repeated above
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    09-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    60

    Re: Assigning IDs to names - is this possible?

    Thank you so much!!!

    Yup, I want repeated IDs. So John Smith will always will always get the same ID number.

    If the names are on column G, and the IDs i wish to create are on column F (see pic attached), what should the formula be?
    I tried to change to fit my needs, but got confused.
    Attached Images Attached Images

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Assigning IDs to names - is this possible?

    I cant open pics (company fire wall and stuff), but try this...
    =IF(COUNTIF($G$2:G2,G2)>1,INDEX($F1:F$2,MATCH(G2,$G1:G$2,0)),MAX($F$1:F1)+1)

  8. #8
    Registered User
    Join Date
    09-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    60

    Re: Assigning IDs to names - is this possible?

    Thanks so much !!!!!!!!!!!!!


  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Assigning IDs to names - is this possible?

    Happy to help and thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Randomly Assigning Names
    By kevinclark100 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 03:36 PM
  2. Assigning names to worksheets from within a macro
    By smgordon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-05-2009, 01:04 PM
  3. Assigning numbers to names
    By Levi in forum Excel General
    Replies: 1
    Last Post: 05-04-2006, 05:40 PM
  4. [SOLVED] Assigning set of range names
    By ADB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2005, 07:05 AM
  5. Assigning sheet names to variables
    By riggsd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2005, 07:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1