+ Reply to Thread
Results 1 to 10 of 10

Require Unique Code from counta formula.

  1. #1
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Require Unique Code from counta formula.

    Dear Sir,
    I have applied this formula to get the unique code.There is a correct result everywhere but where the result is coming 8 and 9 from counta formula or where the result is coming 98 and 99 from counta formula.he is coming result wrong,i want total 6 digit unique code from this formula.

    also i attached the sheet.
    pls suggest if you want to apply some different formula.
    kindly help me..
    Thank you.
    =A&LEFT(C2,1)&IF(COUNTA($C$1:$C2,C2)>999,"",IF(COUNTA($C$1:$C2,C2)>99,"0",IF(COUNTA($C$1:$C2,C2)>9,"00","000")))&COUNTA($C$1:$C2)-1


    FORMULA-2-001 (1).jpg
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Require Unique Code from counta formula.

    Your explanation was not at all clear. So a guess:

    ="A"&LEFT(C2,1)&TEXT(ROWS($A$2:A2),"0000")

    If incorrect upload a small sheet with EXPECTED ANSWERS, not a formula thta does not work.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Require Unique Code from counta formula.

    in the coulmn i , i want to result First Character is "A" and second character is First Charactor of Main District and after series No. continues increment.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Require Unique Code from counta formula.

    I asked you to post a sample sheet with expected answers...

  5. #5
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Require Unique Code from counta formula.

    fisrt charactor of main district "S" of SOLAPUR DISTRICT "L" OF LATUR DISTRICT "O" OF OSMANABAD DISTRICT.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Require Unique Code from counta formula.

    Explain to me WHERE my suggestion DOES NOT work.

  7. #7
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Require Unique Code from counta formula.

    enclosed herewith sample file..
    Attached Files Attached Files

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Require Unique Code from counta formula.

    That is the same sample file with the same NON-WORKING formula.

    I have asked (twice) for a sample file containing Expected Results. I hacve also asked you to tell me WHERE my solution does not work. If you want help, do NOT ignore requests/questions from helpers.

  9. #9
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Require Unique Code from counta formula.

    Quote Originally Posted by Glenn Kennedy View Post
    Your explanation was not at all clear. So a guess:

    ="A"&LEFT(C2,1)&TEXT(ROWS($A$2:A2),"0000")

    If incorrect upload a small sheet with EXPECTED ANSWERS, not a formula thta does not work.

    Sir, This is correct , its my mistake.

    Thank you Sir.. perfect result ..

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Require Unique Code from counta formula.

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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. [SOLVED] Require formula for sorting numbers within a cell using VBA code
    By chintamani.avinash in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-15-2020, 06:12 AM
  2. [SOLVED] How to use several COUNTA functions to create unique Identification Numbers
    By llomax83 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2017, 10:21 PM
  3. Replies: 3
    Last Post: 12-06-2015, 05:06 AM
  4. [SOLVED] Require a formula to count unique dates excluding weekend dates
    By john dalton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-09-2015, 09:17 AM
  5. [SOLVED] Require a code to insert formula in visible cell range only
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2014, 08:25 PM
  6. Macro to require a unique password
    By Jhansen5452 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2013, 12:37 PM
  7. [SOLVED] Require Help - Require Formula for Multiple values in both columns
    By krodge in forum Excel General
    Replies: 6
    Last Post: 01-13-2012, 03:42 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