+ Reply to Thread
Results 1 to 11 of 11

Proper Counting of Days

Hybrid View

dscheeringa Proper Counting of Days 09-18-2012, 11:00 AM
TMS Re: Proper Counting of Days 09-18-2012, 11:16 AM
dscheeringa Re: Proper Counting of Days 09-18-2012, 01:05 PM
TMS Re: Proper Counting of Days 09-18-2012, 03:51 PM
daddylonglegs Re: Proper Counting of Days 09-18-2012, 04:15 PM
daddylonglegs Re: Proper Counting of Days 09-18-2012, 04:43 PM
dscheeringa Re: Proper Counting of Days 09-19-2012, 09:54 AM
dscheeringa Re: Proper Counting of Days 09-19-2012, 09:38 AM
daddylonglegs Re: Proper Counting of Days 09-19-2012, 10:04 AM
dscheeringa Re: Proper Counting of Days 09-19-2012, 10:54 AM
daddylonglegs Re: Proper Counting of Days 09-19-2012, 12:13 PM
  1. #1
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,721

    Re: Proper Counting of Days

    Actually I see from your original formula that if you have a stay from 27th June to 3rd July that counts 3 days in July and 3 in June (effectively not counting the start date), whereas my version is counting 4 in June and 2 in July (not counting the end date) so if you want that to still apply then you can amend the AA9 formula (copied down) to this

    =SUM(IF(F$2:F$34<X9,0,IF(E$2:E$34>EOMONTH(X9,0),0,IF(F$2:F$34=E$2:E$34,1,IF(F$2:F$34>EOMONTH(X9,0),EOMONTH(X9,0),F$2:F$34)-IF(E$2:E$34<X9,X9-1,E$2:E$34)))))

    confirmed with CTRL+SHIFT+ENTER

    or if you want to keep the helper columns just use this formula in J2 copied across and down

    =IF($F2<=J$1-DAY(J$1),0,IF($E2>J$1,0,IF($E2=$F2,1,MIN(J$1,$F2)-MAX($E2,J$1-DAY(J$1)))))
    Audere est facere

  2. #2
    Registered User
    Join Date
    08-08-2012
    Location
    A, A
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Proper Counting of Days

    daddy, I inserted the formula in my current test spreadsheet and confirmed and copied it down, but May only showed 7 and the rest came out to 0. All the cell placements are correct, not sure what happened. Attached is the latest test bed that I am working on. Crisis Stabilization House Intake History testtesttest.xls

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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