+ Reply to Thread
Results 1 to 8 of 8

count if duplication in one column with relation to another column value

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    count if duplication in one column with relation to another column value

    hello everyone

    i have data in column A for different country every country have different city in column B
    the problem it i need to count every same letter in column B related to same value in column A then make result as thew following
    count repeated value in column B till reach number of 10 repeat then start again to count from 1 till end ( meaning make it group each consist of 10)

    example to be clear

    if make filter in column A for NOOOOOOOOOOO Value we can find 53 row and when look to column B we can find letter is F,G,T

    for T letter , its reaped 34 times so i need result in column C as the following each 10 will be as the following
    first 10 T it will be T
    second 10 it will be T1
    Third it will be T2
    Fourth it will be T3
    and soon



    for G letter its only repeated 3 time so it will be G without any number

    for F letter its repeated 16 times so it will be F for first 10 then F2 for remaining repeat

    i try many solution to use helper column but still cant find the right solution
    thanks for your help and support
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: count if duplication in one column with relation to another column value

    Try in C2, copied down:

    =B2&LET(main,$A$2:$A$342,letters,$B$2:$B$342,x,SUM(IF((main=A2)*(letters=B2)*(ROW(main)<=ROW(A2)),1,0)),IF(x<=10,"",CEILING(x/10,1)-1))
    Last edited by nick.williams; 08-04-2022 at 03:36 AM.

  3. #3
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,832

    Re: count if duplication in one column with relation to another column value

    Another possible solution:

    In C2 and copied down:

    =B2&LET(a,ROUNDDOWN(COUNTIFS(A$2:A2,A2,B$2:B2,B2)/10-0.01,0),IF(a=0,"",a))

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,443

    Re: count if duplication in one column with relation to another column value

    another option
    Cell C2 formula , Drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: count if duplication in one column with relation to another column value

    thank you so much for all all work very well

  6. #6
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: count if duplication in one column with relation to another column value

    I noticed an error with mine - it should have had CEILING(x/10,1)-1 instead of FLOOR(x/10,1) at the end. I have edited my post to show the correct version.

  7. #7
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,832

    Re: count if duplication in one column with relation to another column value

    You're welcome. And thanks for the rep.

  8. #8
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,443

    Re: count if duplication in one column with relation to another column value

    @mazan2010 You're Welcome. Glad to help . Thank You for the feedback and rep.

+ 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] How to find the sum of one column in relation to another
    By DLM154 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2020, 09:30 AM
  2. Duplication in Column
    By ionelz in forum Excel General
    Replies: 10
    Last Post: 03-26-2019, 10:42 AM
  3. [SOLVED] Duplication of Courses in a Column
    By cobbrjr in forum Excel General
    Replies: 3
    Last Post: 06-06-2018, 04:05 PM
  4. Using Autofill to repeat formula in column in relation to data in other columns
    By ExcelBenny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2016, 05:38 PM
  5. [SOLVED] Adding a column in relation to another column.
    By amyqueen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2013, 05:57 PM
  6. [SOLVED] Select column A's cell in relation to the row that macro button was clicked on?
    By xlyfe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-09-2013, 12:24 PM
  7. [SOLVED] Duplication in Column
    By Ket in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-03-2005, 11:06 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