+ Reply to Thread
Results 1 to 6 of 6

Calculating the number of duplicate instances of a value in single rows across a table

  1. #1
    Registered User
    Join Date
    05-23-2013
    Location
    Karratha | WA | Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Calculating the number of duplicate instances of a value in single rows across a table

    I have two worksheets. Worksheet one contains a data list and a column populated by a COUNTIF formula. The COUNTIF formula counts the total number of times a value occurs in the table in worksheet two.

    WS1.JPG


    Worksheet two has a table with data validation based on the data list in worksheet one.

    WS2.JPG

    What I need to do is for each value in the data list, count the number of times that value occurs twice on a single row and subtract that number from the number calculated by the COUNTIF formula. This new formula would populate a new column 'C' in worksheet one.

    So in the above example for value 5088 there is one instance of it occuring twice in a single row (C2 & E2) so the new column C would show 3 (4-1). For 6039 there are 3 instances of it occuring twice in a single row (C4 & E4, C8 & E8, D10 & F10) so the new colum C would show 6 (9-3).

    WS1-NEW.JPG

    Can someone please help me with the formula to calculate this. Thanks in advance.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Calculating the number of duplicate instances of a value in single rows across a table

    Instead of pictures please attach a sample workbook with expected output for better understanding and giving exact solution


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    05-23-2013
    Location
    Karratha | WA | Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Calculating the number of duplicate instances of a value in single rows across a table

    Example.xlsx
    As requested an exmple workbook based on the pictures above.

  4. #4
    Registered User
    Join Date
    05-23-2013
    Location
    Karratha | WA | Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Calculating the number of duplicate instances of a value in single rows across a table

    Sorry I should also add that I have put the expected outcome in RED.

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Calculating the number of duplicate instances of a value in single rows across a table

    hi THEByleDuct, welcome to the forum. try this array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ...confirmed by pressing CTRL-SHIFT-ENTER to activate the array. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL-SHIFT-ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  6. #6
    Registered User
    Join Date
    05-23-2013
    Location
    Karratha | WA | Australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Calculating the number of duplicate instances of a value in single rows across a table

    benishiryo you sir are a legend! Thank you so much for your help and thanks for the welcome to the forums.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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