Closed Thread
Results 1 to 3 of 3

Nested What IF excel statement with date ranges

  1. #1
    Registered User
    Join Date
    01-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Nested What IF excel statement with date ranges

    Hello,

    I am trying to create a nested what if statement in excel using multiple date ranges. For example:

    If Cell X > 12/2/2009 but less than 12/31/2011 return 0-3

    If Cell X > 12/2/2006 but less than 12/2/2009 return 3-5

    If Cell X > 12/2/2001 but less than 12/2/2006 return 5-10

    If Cell X < 12/2/2001 return over 10

    The what if statement I created rerutrns the same answer regardless what is in Cell X
    =IF(J31>="12/2/2009"&J31<"12/31/2011","0-3",IF(J31>="12/2/2006"&J31<"12/2/2009","",IF(J31>="12/2/2001"&J31<"12/2/2006","5-10",IF(J31<="12/2/2001","over 10"))))

    Please help

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Nested What IF excel statement with date ranges

    How about
    =LOOKUP(A1, DATEVALUE({0, "12/2/2001", "12/2/2006", "12/2/2009", "12/31/2011"}), {"over 10", "5-10", "3-5", "0-3", ""})
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Nested What IF excel statement with date ranges

    This is a triplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

Closed 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