+ Reply to Thread
Results 1 to 5 of 5

Difference between todays date and another with a 3rd and 4th condition

  1. #1
    Registered User
    Join Date
    12-20-2010
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    15

    Difference between todays date and another with a 3rd and 4th condition

    Hi,

    I am really struggling here, have trawled the web but cannot find any help.

    I have 2 columns.

    A1 contains a date 'Date Raised'

    B1 contains a validated drop down 'Status' containing 'Open', 'Closed' & 'Accepted'

    I need the query to look through the 'Date Raised' coulmn and identify any dates that are greater than 30 days but less than 120 days outstanding. I then need the query to look at the corrosponding 'Status' column and identify if those records which meet the date criteria have 'Open' or 'Accepted' in their status (I want to ignore all 'Closed' records)

    I have tried a lot (and I mean a lot) of different combinations of sumproduct but it is not working,

    any help would be greatly appreciated

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Difference between todays date and another with a 3rd and 4th condition

    Are you just wanting to flag the records which match this?

    If so, in column C you could put:

    =IF(AND(A1>TODAY()+30, A1<TODAY()+120),IF(B1<>"Closed","X",""),"")

    this would flag any records which match the criteria with an X in column C.

  3. #3
    Registered User
    Join Date
    12-20-2010
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Difference between todays date and another with a 3rd and 4th condition

    Sorry,

    I should have been clearer.

    I need to count the number of records which meet this condition (I will use the same code to return between 120 and 180 days and so on)

    I would rather reference the column range in a query then inserting a new column as this can lead to trouble if the formula is dragged down and produces a entry that has no relevence thus upsetting a dashboard where this data is going to be shown. Also, the sheet will be a taking a DB feed which will autopopulate the range so I would not be able to drag down the formula.

    cheers for the reply

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Difference between todays date and another with a 3rd and 4th condition

    Assuming XL2003 per profile:

    Please Login or Register  to view this content.
    modify ranges to suit but keep as lean as possible even given Volatility of above (c/o TODAY)

    If using a DB you could just write some specific queries to return the above results (ie calculate within SQL) rather than return a recordset to Excel and calculate from it.

  5. #5
    Registered User
    Join Date
    12-20-2010
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Difference between todays date and another with a 3rd and 4th condition

    Thanks DonkeyOte,

    Still no joy, returning '0' all the time. ( I had tried this combination a while back)

    Is this something that is possible? I know there is a lot of volitility with dates in excel but I am no expert.

+ 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