+ Reply to Thread
Results 1 to 3 of 3

rank a single or duplicate row and concatenate

  1. #1
    Registered User
    Join Date
    05-01-2020
    Location
    Ireland
    MS-Off Ver
    2013
    Posts
    58

    rank a single or duplicate row and concatenate

    Hi everyone..I'm wondering if anyone can help?

    In my data A2 is the "Claim Number" which can sometimes be duplicated.

    - If a Claim Number is not duplicated, I want to assign a "-1" in B2 (to later concatenate A2 and B2, in C2) example PRNWQ2456568-1

    - If a Claim Number is duplicated, I want to assign a "-1", "-2", "-3" or "-4" etc for each row instance in B6 (to later concatenate A6 and B6, in C6) example PRNSF3459852-3


    Please help with a simple solution for Columns, starting in B2 and C2.
    Thank You !!
    Attached Files Attached Files
    Last edited by MarkJohn51; 06-09-2021 at 12:41 PM.

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: rank a single or duplicate row and concatenate

    A
    B
    1
    Claim Number
    2
    PRNWQ2456568 PRNWQ2456568-1
    3
    PRNWQ2567670 PRNWQ2567670-1
    4
    PRNSF3459852 PRNSF3459852-1
    5
    PRNSF3459852 PRNSF3459852-2
    6
    PRNSF3459852 PRNSF3459852-3
    7
    PRNSF3459852 PRNSF3459852-4
    8
    CSWRE4367101 CSWRE4367101-1
    9
    PRNSF1345616 PRNSF1345616-1
    10
    CSWRE4367101 CSWRE4367101-2



    B2=IF($A2<>"",$A2&"-"&COUNTIF($A$2:$A2,$A2),"")

    Copy down

  3. #3
    Registered User
    Join Date
    05-01-2020
    Location
    Ireland
    MS-Off Ver
    2013
    Posts
    58

    Re: rank a single or duplicate row and concatenate

    Thanks Caracalla for the solution....this is working for my data for most number formats - though if 2 (or more) of my Claim Numbers are similar (except for the final digit) such as:

    Column A
    6115415918272985
    6115415918272987

    ..The formula seems to be not recognising the final digit, in the above numbers "5" and "7"

    therefore after running the formula, the data will result in...

    Column B
    6115415918272985-1
    6115415918272987-2

    As the Claim Numbers are different and have only one instance each, Column B should be:
    6115415918272985-1
    6115415918272987-1

    I have tried various number formats for both Columns A and B (such as Custom, General, Text, Number) though this does not seem to work?

    Please assist if possible.
    Last edited by MarkJohn51; 06-11-2021 at 12:17 PM.

+ 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] Rank by date with duplicate
    By Keibri in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-21-2019, 07:17 AM
  2. Rank with Duplicate values
    By avij90 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2019, 11:15 AM
  3. [SOLVED] Duplicate Rank Problem
    By Stewy1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2015, 07:04 AM
  4. Replies: 2
    Last Post: 04-27-2015, 08:50 AM
  5. How to rank for each year in a single drag
    By mahershams in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-21-2014, 12:06 AM
  6. [SOLVED] Rank - Maintain Series if duplicate rank found
    By ascool_asice in forum Excel General
    Replies: 2
    Last Post: 10-11-2014, 12:35 PM
  7. RANK, duplicate ranking but no gaps in rank
    By arron laing in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-06-2012, 07:15 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