+ Reply to Thread
Results 1 to 5 of 5

If/And Nested Statement between dates

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    If/And Nested Statement between dates

    So I'm hoping that this is my last posting for this project. I received help yesterday to write an expression to count rows if the date was from the previous month and if the the row met the turnaround time. I'm looking to change this expression so that instead of looking at one date, it will look at a range of dates and if any fall during the previous month, I would like it to count it along with meeting the criteria that it meets our turnaround time. Here is my expression.
    Please Login or Register  to view this content.
    Just to clarify a few things, my first set of dates are in column D, the second set in E, and then my turnaround days are listed under F. Is there anything that I can do to look in those range of dates for the previous month and count those only if they also meet the criteria of meeting the turnaround time of less than 3 days?
    Last edited by noobtoexcel; 03-02-2012 at 12:21 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If/And Nested Statement between dates

    why is the range D2:D2?

    Try:

    Please Login or Register  to view this content.
    assuming range of rows is 2:100 and start/end dates to look for are in X2 and Y2 respectively.

    Adjust as needed.
    Last edited by NBVC; 03-02-2012 at 11:57 AM. Reason: added code tabs for cleaner look
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: If/And Nested Statement between dates

    That is working to count the record twice. Is there any way to have it show a 1 instead of 2 if all the criteria is met? It's counting a record for each date that falls in the previous month. For example if my dates are 2/27/2012 and 2/28/2012, it is showing 2 as the count. Whereas if the dates are 1/31/2012 and 2/1/2012, it is only counting 1. If possible, I would like the criteria to count only if the date occurs in the previous month and between those two dates, and if it meets my turnaround time.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If/And Nested Statement between dates

    Try this one:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: If/And Nested Statement between dates

    Works like a charm! Thank you so much!

+ 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