+ Reply to Thread
Results 1 to 4 of 4

Counting number of people per day, but not duplicates

Hybrid View

  1. #1
    Registered User
    Join Date
    04-15-2019
    Location
    MI, USA
    MS-Off Ver
    Office 2010
    Posts
    2

    Counting number of people per day, but not duplicates

    As an X-Ray tech I have to log every exam I do. What I'd like is something that tells me how many patients I radiographed per day, but not adding duplicate names. My log looks like this:



    Patient Name Date Gender DOB Exam Views Physician
    Patient 1 04/01/19 M 01/01/70 Chest 2 Physician A
    Patient 2 04/01/19 F 02/01/70 Left Hand 3 Physician B
    Patient 2 04/01/19 F 02/01/70 Left Wrist 3 Physician B
    Patient 3 04/01/19 M 03/01/70 Lumbar Spine 2 Physician A
    Patient 4 04/01/19 M 04/01/70 Right Shoulder 2 Physician A
    Patient 5 04/02/19 M 05/01/70 Right Foot 3 Physician B
    Patient 6 04/03/19 F 06/01/70 Cervical Spine 5 Physician A

    How can I get my output to not count Patient 2 twice?

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Counting number of people per day, but not duplicates

    Hi,


    in the example, in H2 to be confirmed with control+shift+enter before to be copied below: the formula needs array status...

    =IFERROR(SUM(IF(FREQUENCY(IF(B$2:B$100=B2,MATCH(A$2:A$10,A$2:A$100&"",0)),ROW($2:$100)-1),1)),"")


    Please see the attachment

    Regards
    Attached Files Attached Files
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    04-15-2019
    Location
    MI, USA
    MS-Off Ver
    Office 2010
    Posts
    2

    Re: Counting number of people per day, but not duplicates

    Thank you for replying. The formula works just fine. What can I do if I want to condense it to something like:

    Date # of Patiens
    04/01/2019 4
    04/02/2019 1
    04/03/2019 1

    I should have mentioned this in my original post, sorry. Thank you for being helpful.
    Last edited by Strongbad42; 04-15-2019 at 04:40 PM.

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Counting number of people per day, but not duplicates

    Hi,

    in K2

    =IFERROR(INDEX(B$2:B$1000,MATCH(0,INDEX(COUNTIF(K$1:K1,B$2:B$1000&""),),0)),"")

    to be copied down.

    Please check format applied to K2 ("MM/DD/YYYY;;") to hide zeros.


    In L2 to be confirmed with control+shift+enter (in the formula bar you should see formula embraced in curly brackets)

    =IFERROR(SUM(IF(FREQUENCY(IF(B$2:B$1000=K2,MATCH(A$2:A$10,A$2:A$1000&"",0)),ROW($2:$1000)-1),1)),"")

    or in L2 (just to be copied)

    =IF(K2>0,SUMPRODUCT(1/COUNTIF(A$2:A$100,A$2:A$100&"")*(B$2:B$100=K2)),"")

    should do the trick too.

    Regards
    Attached Files Attached Files
    Last edited by canapone; 04-16-2019 at 01:29 AM.

+ 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. Counting number of people in a queueing system
    By Tob229 in forum Excel General
    Replies: 2
    Last Post: 12-12-2016, 10:15 PM
  2. Counting number of people that appear at a particular times
    By Lan Tran in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-25-2015, 07:42 AM
  3. Counting The Number Of Extra People Working Each Hour
    By stagnut in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-19-2014, 07:52 AM
  4. Counting the Number of people on a course
    By markgriggs in forum Excel General
    Replies: 2
    Last Post: 07-18-2012, 06:34 AM
  5. Counting the Number of people on a course
    By markgriggs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2012, 06:27 AM
  6. Counting number of people by time
    By gilrami2 in forum Excel General
    Replies: 2
    Last Post: 07-02-2012, 10:08 AM
  7. Replies: 3
    Last Post: 04-03-2012, 10:16 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