+ Reply to Thread
Results 1 to 8 of 8

Fill cells with discharge dates

  1. #1
    Registered User
    Join Date
    04-14-2015
    Location
    Plymouth, England
    MS-Off Ver
    7
    Posts
    12

    Fill cells with discharge dates

    Hi,

    Hope you can help.

    I work as an analyst in a hospital.

    I have 3 columns in my report that are important to my work:
    Column 1 - Patient number Column 2 - Admission date Column 3 - Discharge date

    I can pull off a separate report from the system which has details of discharged patients:
    Column 1 - Discharge date Column 2 - Hospital number

    I need a formula to quickly fill Column 3 with discharge dates for patients who have discharged and have it not affect any other cells.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Fill cells with discharge dates

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    04-14-2015
    Location
    Plymouth, England
    MS-Off Ver
    7
    Posts
    12

    Re: Fill cells with discharge dates

    Hopefully it has attached.

    I was hoping there would be a formula I can use and then record as a macro to end up with the "after" result.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-14-2015
    Location
    Plymouth, England
    MS-Off Ver
    7
    Posts
    12

    Re: Fill cells with discharge dates

    Anyone able to help?

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

    Re: Fill cells with discharge dates

    Try in cell F6 sheet After:

    =IFERROR(INDEX(Discharges!A:A,MATCH(D6,Discharges!B:B,0)),"")

    Drag down
    Quang PT

  6. #6
    Registered User
    Join Date
    10-06-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Fill cells with discharge dates

    Hi,

    In the second report you run, are you able to run the admission date as well? If so, you should be able to create your own visit ID, by using:
    =CONCATENATE(Hospital number,Admission Date). If you do the same for the Second report, you can then do a VLOOKUP formula, which will compare the 2 unique IDs and find the Discharge date. I have amended the file you attached, and if you can run the report this way it should work.

    I have also assumed your COUNTA formula in column G for Discharge should only count those who HAVE been discharged, I have amended this as it will count the formulas as being not blank as well.

    Two other points, 1) are these real hospital numbers? If so these should not be put on a public website, in future make sure they are obviously fake e.g. F111111, F111112 etc. 2) I assume you use both A and F Hospital numbers, and the others start with a 0. If you change the column formatting to text before you copy these over they will retain the 0 at the start.

  7. #7
    Registered User
    Join Date
    04-14-2015
    Location
    Plymouth, England
    MS-Off Ver
    7
    Posts
    12

    Re: Fill cells with discharge dates

    Mega.

    Thank you very much bebo

  8. #8
    Registered User
    Join Date
    10-06-2016
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    17

    Re: Fill cells with discharge dates

    Quote Originally Posted by bebo021999 View Post
    Try in cell F6 sheet After:

    =IFERROR(INDEX(Discharges!A:A,MATCH(D6,Discharges!B:B,0)),"")

    Drag down
    If patients have more than one admission in the time period, this will not differentiate them.

+ 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] Fill in dates based on a date range in 2 cells
    By braun.reivn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2014, 05:54 PM
  2. Auto Fill Cells With Dates
    By Justair07 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2013, 11:27 AM
  3. Auto-fill cells with Dates based on another date cell
    By oneilkr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-16-2013, 07:32 PM
  4. To fill a range of cells with a series of dates automatically
    By tdsmith14 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2013, 10:57 AM
  5. Manipulating intake & discharge dates, counting between dates
    By lisast in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-02-2013, 03:59 AM
  6. Conditional Format To Fill Cells Between Two Dates
    By demonfly100 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-04-2012, 07:56 AM
  7. Fill in multiple cells driven by dates entered
    By liam_bettinson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2011, 06:59 PM
  8. Replies: 1
    Last Post: 05-27-2010, 12:32 PM

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