+ Reply to Thread
Results 1 to 8 of 8

How to give a number a unique number

  1. #1
    Forum Contributor
    Join Date
    03-08-2019
    Location
    England
    MS-Off Ver
    2016
    Posts
    104

    How to give a number a unique number

    Hello,

    My problem is as follows; in Col A I have a series of numbers and in Col B I want a unique number in Col B to align with Col A in the format of 1, 2, 3 etc as below so.. I need a formula for the following

    Col A

    10
    20
    1547251
    141
    10
    15778212
    10
    20


    Col B

    1
    2
    3
    4
    1
    5
    1
    2


    So, every time 10 appears it is assigned the 1 and every time 20 appears it is assigned a 2 and so on and so forth.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to give a number a unique number

    hi
    try
    =Left(A1,1)+0

  3. #3
    Forum Contributor
    Join Date
    03-08-2019
    Location
    England
    MS-Off Ver
    2016
    Posts
    104

    Re: How to give a number a unique number

    Hello, unfortunately this has not worked.

    My results are as follows when trying that formula

    Col A

    10
    20
    1547251
    141
    10
    15778212
    10
    20

    Col B

    1
    2
    1
    1
    1
    1
    1
    2

  4. #4
    Forum Contributor
    Join Date
    08-14-2018
    Location
    Hanoi, Vietnam
    MS-Off Ver
    2016
    Posts
    118

    Re: How to give a number a unique number

    Try
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-08-2019
    Location
    England
    MS-Off Ver
    2016
    Posts
    104

    Re: How to give a number a unique number

    Hello,

    The following does work... however I need something for about 3000 lines of data and numbers such as 1547251 occur more than once but is given a new number with the above formula. I apologise for not being clearer in my original post. - I need a more generic formula that will work even when I update the data in Col A.


    So tomorrow I may have numbers


    Col A


    50
    50
    10000
    5054
    545454
    5054

    and so on and so forth

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: How to give a number a unique number

    Try this in B2 and copy down.

    =IFERROR(VLOOKUP(A2,$A$1:B1,2,0),MAX($B$1:B1)+1)

  7. #7
    Forum Contributor
    Join Date
    08-14-2018
    Location
    Hanoi, Vietnam
    MS-Off Ver
    2016
    Posts
    118

    Re: How to give a number a unique number

    Not sure if this is what you need, plz try
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    03-08-2019
    Location
    England
    MS-Off Ver
    2016
    Posts
    104

    Re: How to give a number a unique number

    Both excellent than you!

+ 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. get most frequent number mode.mult give me same number
    By tomislav91 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-13-2017, 03:40 AM
  2. Replies: 2
    Last Post: 07-01-2015, 05:32 PM
  3. I need to get give each row inputted a unique number for later editing
    By tarmacfitter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-14-2014, 10:19 AM
  4. [SOLVED] Need a function to give the last row number/cell number
    By kishoremcp in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-20-2013, 04:47 AM
  5. SQL sentance to give unique values a number in percent of total?
    By alfi83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2013, 08:26 AM
  6. Replies: 0
    Last Post: 09-06-2012, 10:41 AM
  7. [SOLVED] Need a Formula to give a group a unique number
    By rbpd5015 in forum Excel General
    Replies: 7
    Last Post: 05-15-2012, 11:59 AM

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