+ Reply to Thread
Results 1 to 8 of 8

How do I count a date if it falls between two dates specified in other cells?

  1. #1
    Registered User
    Join Date
    07-03-2009
    Location
    Denver, CO
    MS-Off Ver
    Excel 2003
    Posts
    6

    Wink How do I count a date if it falls between two dates specified in other cells?

    Hi, I'm sure my answer is somewhere in these gazillions of threads but I can't find it! I really need to know how to have Excel look at a date (mmddyy) in cell G7and determine if that date, plus one, is more than or equal to the date in B3 and is also less than the date in B4. If the date in G7 meets both criteria, then I need to count that date. Then of course, I need to copy this formula down the page for G8, G9, G10.... The formulas should always refer back to B3 (which is the start date of the current billing cycle) and B4 (which is the last date of the current billing cycle) however. What I'm attempting to do is to count the number of admissions on a bill that occur in the current billing month. G7,G8, G9....are individual admission dates which could be dates from previous months; i.e. I'm doing the June bill and the admission date in G7 is hypothetically 05-31-09. My bill start date is one day after the admission date (hence the "plus one" mentioned previously), so this date should be counted. However, let's say G8's date is 04-03-09. so G8 should not be counted. If G9's date is 06-22-09, it also needs to be counted. Hence, if that was my entire bill, I should have two dates that were counted. Is this a CountIf function? I tried making another column and converted all the admission dates into Julian dates, and made separate cells for the Julian dates for B3 and B4, but still couldn't get a formula to work.

    Thanks for any help!

    misspen
    Last edited by misspen; 07-03-2009 at 01:24 AM. Reason: must be less than B4

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: How do I count a date if it falls between two dates specified in other cells?

    Can you upload an example workbook?

  3. #3
    Registered User
    Join Date
    07-03-2009
    Location
    Denver, CO
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: How do I count a date if it falls between two dates specified in other cells?

    hmmm.....I've got an example if I could figure out how to upload it...

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: How do I count a date if it falls between two dates specified in other cells?

    You can reply (or edit some post -> go advanced) and you'll see sticker on the top.

    Upload file and then close dialog box and choose it from same sticker)

  5. #5
    Registered User
    Join Date
    07-03-2009
    Location
    Denver, CO
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: How do I count a date if it falls between two dates specified in other cells?

    Not sure if I got this uploaded or not!
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523

    Re: How do I count a date if it falls between two dates specified in other cells?

    Does this formula work:

    Please Login or Register  to view this content.
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  7. #7
    Registered User
    Join Date
    07-03-2009
    Location
    Denver, CO
    MS-Off Ver
    Excel 2003
    Posts
    6

    Wink Re: How do I count a date if it falls between two dates specified in other cells?

    Like a charm! wonderful! 'Smarvelous! I then used =COUNTIF(L7:L28,TRUE) to count the number of occurences. I can now count my number of admissions for each month without having to go through a 20 page report by hand!

    Thank you! Thank you!

    Hope all our US users had a wonderful 4th

    misspen

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: How do I count a date if it falls between two dates specified in other cells?

    Now is 5th so you can make thread [solved]

    Go to first post -> Edit -> Go advanced -> Choose SOLVED from title drop down menu

+ 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