+ Reply to Thread
Results 1 to 10 of 10

Count duplicates in two columns / Averageif question

  1. #1
    Registered User
    Join Date
    07-05-2018
    Location
    Amsterdam
    MS-Off Ver
    Excel 2016
    Posts
    5

    Count duplicates in two columns / Averageif question

    Hi guys,

    I have a couple of questions. Firstly, I was wondering how to count the number of duplicates in two columns. I have done conditional formatting to highlight the duplicates. However, an issue with this is that I only want to highlight it if the values in one of my columns is also in the other, and not in the same.

    I have attached the excel file. I want to count how many of the numbers under class2 column occur at some point in class1. (overlap quantity)(total, not unique numbers). I also want to count how many don't occur in class 1. (non-overlap quantity).

    Then, for those cells in the class2 column which do occur in class1, I want to average the total number of "cites5yr2" (overlap qual). For example, the value "514" in class2 (C column) occurs at least once in class1 (A column), so this should be highlighted as an "overlap". Then, for every corresponding value in the C column where there is this overlap, I want to include in my averageif function for the D column.

    And once again, I want to average the "cites5yr2" column for those where the number in class2 didn't occur in class 1 (nonoverlap_qual).

    I guess I have to use some kind of mix between countif, conditional formatting, and averageif?

    Any help would be greatly appreciated.
    Kind regards,
    Chris
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor than_gold's Avatar
    Join Date
    10-17-2017
    Location
    Coimbatore India
    MS-Off Ver
    Office 365
    Posts
    646

    Re: Count duplicates in two columns / Averageif question

    Hello Chris,
    Welcome to the forum!!

    Try this please:
    OVERLAP_QUANT :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    NONOVERLAP_QUANT:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards,
    Thangavel D

    Appreciate the help? CLICK *

  3. #3
    Valued Forum Contributor than_gold's Avatar
    Join Date
    10-17-2017
    Location
    Coimbatore India
    MS-Off Ver
    Office 365
    Posts
    646

    Re: Count duplicates in two columns / Averageif question

    Check out here as well pls:
    https://www.extendoffice.com/documen...ue-values.html

  4. #4
    Registered User
    Join Date
    07-05-2018
    Location
    Amsterdam
    MS-Off Ver
    Excel 2016
    Posts
    5

    Re: Count duplicates in two columns / Averageif question

    Hi Thangavel,

    Thanks a lot for your reply! Sorry, I think you misunderstood. I believe this is summing all of the values which are duplicated. I only want to know how many of the values in class2 at some point occur in class1. For example, considering cell C2 (514) we can see that, for example, cell A9 is also (514). Then, I count all the 514's, and see that there are 38. Then, for example, I look at the number of 435's (which occurs at least once in class1, for example, cell A2). I see that there are 5. I do this for all the different values which occur in the class2 column, then sum them, so 38 + 5 + ...

    The total sum of this is what I want for OVERLAP_QUANT. A similar method for NONOVERLAP_QUANT, but then simply the ones which don't occur.
    Any ideas?

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Count duplicates in two columns / Averageif question

    for 568: class1 = 7, class2 = 1 so count is 7 or 1 ?

  6. #6
    Valued Forum Contributor than_gold's Avatar
    Join Date
    10-17-2017
    Location
    Coimbatore India
    MS-Off Ver
    Office 365
    Posts
    646

    Re: Count duplicates in two columns / Averageif question

    FOr 514 - 500 values in col A....

  7. #7
    Registered User
    Join Date
    07-05-2018
    Location
    Amsterdam
    MS-Off Ver
    Excel 2016
    Posts
    5

    Re: Count duplicates in two columns / Averageif question

    Sorry, I made this unclear. I am only interested in the count of duplicate values of column C (class2).

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Count duplicates in two columns / Averageif question

    I'll try again...

    how many times the value from column class2 is in the class1 column

    class1 class2 Count
    514
    514
    19000
    435
    435
    1105
    424
    424
    127
    546
    546
    58
    549
    549
    48
    210
    210
    10
    568
    568
    7


    is that what you want?

  9. #9
    Valued Forum Contributor than_gold's Avatar
    Join Date
    10-17-2017
    Location
    Coimbatore India
    MS-Off Ver
    Office 365
    Posts
    646

    Re: Count duplicates in two columns / Averageif question

    count of duplicate values of column C (class2) with respect to col A?
    Ex:
    514, 568 repeated then total count 2?!

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Count duplicates in two columns / Averageif question

    I think you should improve your description to make it more clear and transparent

+ 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] 2 Columns - Want To Count Number of Non Duplicates
    By bigtunelover in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2017, 12:25 PM
  2. [SOLVED] Count duplicates in several columns
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-27-2017, 05:56 AM
  3. [SOLVED] Count Unique Values with Duplicates in Multiple Columns
    By sTeezZy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-26-2016, 05:50 PM
  4. Replies: 1
    Last Post: 06-19-2014, 06:35 PM
  5. Replies: 3
    Last Post: 11-09-2011, 12:36 PM
  6. simple averageif question
    By tannerbabb in forum Excel General
    Replies: 4
    Last Post: 03-31-2011, 12:54 PM
  7. Using a Formula to Count Duplicates in two Columns
    By JungleJme in forum Excel General
    Replies: 2
    Last Post: 08-25-2010, 07:01 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