+ Reply to Thread
Results 1 to 5 of 5

Cutting a length of time into month segments

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Cutting a length of time into month segments

    Hello,

    I am trying to figure out how to get something called monthly census for a nursing home. I have a list(fairly long) of start dates and length of stays. Ig 1/1/15 stayed for 45 days. I need to allocate 31 days to Jan and 14 days to Feb. I would do it for the next one and keep a running tally of for the months involved. I attached a sample and am looking to fill the cells highlighted yellow. (First Sheet)

    I've been able to break it out using formulas, but the output is a distribution for each individual patient vs month and then I use a pivot table to aggregate. The problem with this solution is that I need everything to update automatically when I place data into the tool I am making. (Second Sheet)

    Any thoughts on improving on my knuckle dragging solution would be appreciated.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,895

    Re: Cutting a length of time into month segments

    See attached file - hopefully it is fairly obvious to you what is happening, but come back if you need further explanations.

    Hope this helps.

    Pete
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Cutting a length of time into month segments

    This makes sense, but I was hoping for something without the huge place holder table. It does the trick of automatically updating though.

    Thanks,

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,895

    Re: Cutting a length of time into month segments

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Pete

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Cutting a length of time into month segments

    If you want the yellow cells to update without other helper cells then you can use this "array formula" in H2, confirmed with CTRL+SHIFT+ENTER, copied to I2 and down both columns - see attached:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I added the orange cells to verify that the total number of days in column B matches the total number of days in the yellow table
    Attached Files Attached Files
    Last edited by daddylonglegs; 02-26-2015 at 08:35 PM.
    Audere est facere

+ 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] Day overran month length 2012-10-36
    By bbo2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-15-2013, 09:27 AM
  2. Optimized cutting length help needed
    By mr63249 in forum Excel General
    Replies: 2
    Last Post: 05-31-2013, 08:06 AM
  3. [SOLVED] “… there will be »segments«”: cutting up a sequence into smaller chunks
    By Schroeder70 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-17-2013, 07:41 AM
  4. [SOLVED] Code to auto filter three month segments of data from today's date
    By gryffin13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2012, 04:51 PM
  5. [SOLVED] Separating day time segments
    By MLP in forum Excel General
    Replies: 2
    Last Post: 05-16-2006, 11:45 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