+ Reply to Thread
Results 1 to 5 of 5

Lookup unique identifier to see if dates fall within a range

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    13

    Lookup unique identifier to see if dates fall within a range

    Hi there,

    I have 200,000 unique identifiers (for patients) and I'm trying to do 2 things:

    1. I want to know if they came back to hospital within 28days (by using the previous discharge date and current admission date)
    2. If they did come back to hospital, I want to know their previous separation mode.

    I've attached workbook which has further details of what I'm trying to achieve but have no idea where to start with the formulas!.

    Thanks in advance for your help!


    -A
    Attached Files Attached Files

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

    Re: Lookup unique identifier to see if dates fall within a range

    In F2:
    =IFERROR(IF(C2-LOOKUP(2,1/($A$1:A1=A2),$D$1:D1)<=28,"Yes",""),"")

    G2:
    =IF(F2="Yes",LOOKUP(2,1/($A$1:A1=A2),$E$1:E1),"")

    Drag both down
    Quang PT

  3. #3
    Registered User
    Join Date
    11-25-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Lookup unique identifier to see if dates fall within a range

    Thanks bebo, it works! But the formulas are dependent on the Patient Identifier and Discharge Dates being sorted, right? What if I need to add more current data to the dataset? I'd need to sort it each time? Is there another way of doing the formula without having to sort the data?

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

    Re: Lookup unique identifier to see if dates fall within a range

    No need to sort. The formula looks for the same nearest upper ID in column then returns the corresponding date

  5. #5
    Registered User
    Join Date
    11-25-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Lookup unique identifier to see if dates fall within a range

    Hi bebo,

    Thanks again for your message - I did try to "jumble' the data around but it doesn't work unless it's sorted and my computer crashed trying to apply the formula to over 200,000 episodes despite having 16GB RAM!!!


    Best,
    A

+ 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] Lookup help - can lookup address values that fall within a range?
    By Ruthie83 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-16-2013, 10:25 PM
  2. Count Unique values if they fall between a date range
    By Racecarjoe in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-24-2012, 06:41 PM
  3. Counting unique values which fall between two dates from two sheets.
    By RogerRangeRover in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-07-2012, 01:00 AM
  4. [SOLVED] Match/Lookup?...No unique identifier
    By sc077yc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2012, 05:31 AM
  5. [SOLVED] How to COUNTIF/LOOKUP for items that fall between two dates.
    By ScotyB in forum Excel General
    Replies: 4
    Last Post: 04-09-2012, 06:59 PM
  6. [SOLVED] Averaging values if desired dates fall between range of dates
    By gbcpurdue in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2012, 02:51 PM
  7. Need Sumif to count dates that fall within a range of dates
    By Paralegal101 in forum Excel General
    Replies: 1
    Last Post: 09-12-2011, 02:26 PM
  8. Lookup and sum cells that fall between certain dates
    By albardit18 in forum Excel General
    Replies: 1
    Last Post: 07-06-2011, 11:31 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