+ Reply to Thread
Results 1 to 5 of 5

IF function for unique/last occurring unique cases?

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    8

    IF function for unique/last occurring unique cases?

    Hi there,

    I have an excel file that lists individuals who came into the clinic on a given day. I am interested in figuring out the amount of unique individuals in a given month/overall. As this is a working datasheet, I would like a formula that would automatically update this information for me. Here is an example of the file that I am working with: unique case example.xlsx

    Specifically, I want an IF function that could place an 'x' in column E depending on if the name in column C is a unique instance. But if the name appears several times in the list, I would also like this function to place an 'x' in column E next to the last occurring unique instance. For example, the name 'Hanna D' occurs 3 times in the spreadsheet I have attached, but I want the 'x' to be next to the most recent incident, when she was screened, as opposed to when she was not contacted (missed/doc forgot).

    That being said, I am not sure if you can even define a unique case in the IF function, let alone the last occurring unique case, but any suggestions would be very helpful.

    Thank you!

    -D

    PS I am not interested in conditional formatting (highlighting duplicate cases and then placing an 'x' next to the most recent highlighted case) because my spreadsheet has 300+ individuals and it is very time consuming to manually move the 'x' when the same individual appears at a later time.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: IF function for unique/last occurring unique cases?

    Put in E3 and copied down:

    =IF(AND(A3=INDEX(A:A,MAX(($C$3:$C$36=C3)*ROW($C$3:$C$36))),COUNTIF($C$3:$C$36,C3)>1),"X","")

    dont forget to press CTRL-SHIFT-ENTER button together, coz this Array Formula

    Azumi
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-11-2014
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: IF function for unique/last occurring unique cases?

    Great! That solves my problem with finding the last occurring unique case. But can I also apply a formula that does the same thing to a unique case (that does not repeat)? And would it be possible to put both of these formulas in the same column so that I have an 'x' appear next to all unique cases AND last occurring unique cases if there are doubles?

    Thanks for taking the time to respond!

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,647

    Re: IF function for unique/last occurring unique cases?

    Multi-condition would helps thing easier !

    Check below data to see if there is unique case or not. If no, mark "X", else leave blank.

    =IF(C3="","",IF(COUNTIF(C4:$C$37,C3)=0,"X",""))
    Quang PT

  5. #5
    Registered User
    Join Date
    02-11-2014
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: IF function for unique/last occurring unique cases?

    Perfect thank you so much!

+ 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 get the unique cases in a column?
    By BNCOXUK in forum Excel General
    Replies: 6
    Last Post: 08-07-2013, 07:13 PM
  2. [SOLVED] list of duplicate code along with unique manager name want to split unique
    By sinha.riteshabap in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2013, 07:00 AM
  3. [SOLVED] create list of unique staff numbers with unique work codes
    By shaz0503 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-01-2013, 08:57 PM
  4. [SOLVED] Count unique cases in a weekly bucket
    By melnemac32 in forum Excel General
    Replies: 2
    Last Post: 10-25-2012, 01:21 PM
  5. Replies: 7
    Last Post: 05-11-2012, 02:00 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