+ Reply to Thread
Results 1 to 11 of 11

Counting Duplicates as 1

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Counting Duplicates as 1

    Hi Everyone,

    I have reached my ceiling of excel knowledge here though the task doesn't sound as if it should be this difficult. I am trying to summate the total number of patients that a particular physician has referred to us. The data I'm given lists multiple duplicates of the same patient and evaluation date for various reasons.... . The issue I"m running into is trying to find a way to count my duplicates as 1 before summing my total. Key point: Duplicates are denoted by having the same Patient Name and Evaluation Date. The columns in the workbook are named as "ReferringMD", "PatientName" and "EvalDate" repectively; All names (which are now numbers), dates and physician names (Gameshow host Bob Barker ) on the attached sheet are ficticious. All raw data is listed in the "Data Input" tab.

    I would really appreciate any help here.

    THANK YOU!
    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,063

    Re: Counting Duplicates as 1

    Please disregard this post. Wrong place..
    Last edited by Glenn Kennedy; 06-12-2014 at 05:56 PM.
    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
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Counting Duplicates as 1

    There are no duplicate patient names. I'm going to assume your real data has them and create duplicates for you.
    Attached Files Attached Files
    1. Include a sample workbook with an example of the result you want
    2. Use [CODE] and [FORMULA] wrappers for your VBA code or excel formulas
    3. If your question has been answered, mark the thread as SOLVED and click on the "Add Rep" star to thank whoever helped you.

  4. #4
    Registered User
    Join Date
    02-06-2014
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Counting Duplicates as 1

    Hi Glenn,

    I was expecting formulas such as Countifs( with others embeded would be a solution here. If Excel Formulas and Equations is the wrong place to post this, could you please direct me to the correct area?

    Thank You.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Counting Duplicates as 1

    PublicPeguin, I think Glen was refering to his own post, which he made in error and deleted
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Counting Duplicates as 1

    As pointed out, you dont actually have any duplicate patient names (numbers). Not sure how you put the numbers in there, but they extent out to as many as 4 decimal places, and are all incrimental

    I used this in W8, copied down, to get the patient "names" to be the same...
    =ROUND(A8,0)

    Then I used this in V8, copied down, to just pull in 1 instance if pateint/Doc (yes you were correct, countifs)...
    =IF(COUNTIFS($W$8:W8,W8,$D$8:D8,D8,$B$8:B8,">="&'Physician Summary'!$H$4,$B$8:B8,"<="&'Physician Summary'!$L$4)>1,"",D8)

    You can now use this to fine the number you need

  7. #7
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Counting Duplicates as 1

    I think he was saying that he posted in the wrong thread, not that you posted in the wrong forum.

    Edit: Exactly, like FDibbins just said

  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,063

    Re: Counting Duplicates as 1

    Yep. My post was made in error. Apologies for confusion caused. An increasingly common senior moment!

  9. #9
    Registered User
    Join Date
    02-06-2014
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Counting Duplicates as 1

    Hi Everyone,

    THANK YOU!!! I have not been able to get back to work to check these solutions due to my school schedule though I have today. Both solutions gave me a path to a final product. By the way, nice recognition noting that my patient numbers were extended fractions and thus would never equal each other. Ultimately I used KDibbins solution adjusting the final output to an integer of 1 if the counifs( returned a value above 1.

    Please Login or Register  to view this content.
    This allowed me to integrate this product into other formulas creating a much more thurough report. Thank you both again. In case anyone is interested in how this was used. I checked it with the equation below to verify if a patient had been evaluated within our specified date range while also excluding any duplicate patient accounts for the same evaluation date. I was unable to get a functional array count to work to count patients whom did or didn't have a filled in discharge date which would have made this formula much cleaner, but adding each individual formula seperately worked just fine.

    Please Login or Register  to view this content.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Counting Duplicates as 1

    Happy to help, and thanks for the feedback

  11. #11
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Counting Duplicates as 1

    Good to hear. Glad I could help Thanks for the +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] Counting without duplicates
    By Janie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2014, 02:30 PM
  2. [SOLVED] Counting Matching values in two separate ranges without counting duplicates
    By Rhall6310 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-01-2014, 03:35 PM
  3. [SOLVED] Counting Duplicates
    By dbaldwin1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-20-2013, 05:56 PM
  4. counting cells with data without counting duplicates
    By labettis in forum Excel General
    Replies: 2
    Last Post: 11-05-2007, 12:10 PM
  5. Counting Duplicates
    By kteicher in forum Excel General
    Replies: 4
    Last Post: 03-23-2005, 05:44 PM

Tags for this Thread

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