+ Reply to Thread
Results 1 to 8 of 8

Counting Dates and Finding Earliest

  1. #1
    Registered User
    Join Date
    07-14-2006
    Posts
    50

    Question Counting Dates and Finding Earliest

    All,
    Ive been trying this for a while and seem to be getting no-where. In column A i have a list of dates (in dd/mm/yy format). I need to be able to pull off the following information at any given time:

    Number of dates between:
    27/06/2004 and 05/07/2006* and the earliest date that falls between these dates
    06/07/2006 and 27/09/2006* and the earliest date that falls between these dates
    28/09.2006 and TODAY and the earliest date that falls between these dates

    Idealy i would like to only have to amend the 2 dates with the (*) as the other dates will auto update.

    Does anybody have any ideas how to count the dates that fall between the 2 dates and how to work out the earliest one?

    Any help is welcome.

    Thanks.

    Emma x

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Does this help?
    Attached Files Attached Files
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    07-14-2006
    Posts
    50
    Thanks for the reply. Please see attachment. Attachments always describe things better.
    Attached Files Attached Files

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695
    Hello Emma, see attached

    The formula in cell F2 copied down....

    =MIN(IF(A$2:A$8>=C2,IF(A$2:A$8<=D2,A$2:A$8)))

    needs to be confirmed with CTRL+SHIFT+ENTER. To do this put formula in cell, press F2 key then hold down CTRL and SHIFT keys and press ENTER. Curly braces like { and } will appear around the formula in the formula bar
    Attached Files Attached Files
    Last edited by daddylonglegs; 07-23-2007 at 06:56 PM.

  5. #5
    Registered User
    Join Date
    07-14-2006
    Posts
    50
    Thanks for this daddylonglegs. It looks like it works. But...(there is always a but isnt there?) this list changes every minute so i would need the ranges in column E (EG A2:A8) to extend past the last entry (A8). This throws up good old #value errors. Any suggestions on this?

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695
    Hello emma,

    I don't see why that would be a problem, if you extend the ranges A1:A8 to something larger the formulas still work OK even if you have blanks or text in those ranges.

    If you change the ranges then you need to change all ranges within a formula to the same size, otherwise you may get an error.

    If that doesn't fix it can you post the exact formula that gives an error?

  7. #7
    Registered User
    Join Date
    07-14-2006
    Posts
    50
    daddylonglegs - you hit the nail on the head...i didnt change the range on all the formulas. Here is a copy incase you need it (and i need to refere to it again ).
    Thanks for all your help!

    Thanks

  8. #8
    Registered User
    Join Date
    07-14-2006
    Posts
    50
    Attachment this time
    Attached Files Attached Files

+ 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