+ Reply to Thread
Results 1 to 4 of 4

Formula to assign a number to each entry

  1. #1
    Registered User
    Join Date
    01-12-2021
    Location
    Orlando FL
    MS-Off Ver
    2013
    Posts
    7

    Formula to assign a number to each entry

    In the attached spreadsheet there are 4 entries. One is for Jody Rogers and three are for Asad Bangash. Can a formula be created that will assign a number to each persons last name? The number would have to be the same when the same name is repeated. The numbers assigned can start at 1.

    This would have to be a formula that can be copied and pasted into the entire first row as this spreadsheet will have hundreds of entries.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: Formula to assign a number to each entry

    You can use this formula in cell A2:

    =IF(B2="","-",IF(COUNTIF(B$2:B2,B2)=1,MAX(A$1:A1)+1,INDEX(A:A,MATCH(B2,B:B,0))))

    then copy it down as far as you want to - the hyphens will show where the formula is active.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    01-12-2021
    Location
    Orlando FL
    MS-Off Ver
    2013
    Posts
    7

    Re: Formula to assign a number to each entry

    Thank you so much Pete.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: Formula to assign a number to each entry

    You're welcome - glad to help.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Formula to Assign Number to Multiple Criteria
    By RainOnRahoon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-13-2020, 01:09 PM
  2. [SOLVED] formula to look for a number entry on one worksheet and return another fixed entry
    By kahuna130 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2014, 04:15 PM
  3. Formula to assign a visit number
    By Amanco in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-05-2013, 08:42 PM
  4. [SOLVED] Formula to assign a word to each number?
    By kwall2011 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-08-2012, 07:43 AM
  5. Assign serial number for entry
    By ebin charles in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-11-2010, 06:07 AM
  6. Right arrow after number entry starts formula entry
    By rustleg in forum Excel General
    Replies: 8
    Last Post: 10-11-2009, 05:33 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