+ Reply to Thread
Results 1 to 3 of 3

Check If 2 dates (or any dates in between) fall in Tax Year

  1. #1
    Registered User
    Join Date
    07-10-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Check If 2 dates (or any dates in between) fall in Tax Year

    I want to create a function that will check 2 user input dates (and anything in between) to see if it lies in a defined tax year.

    I will define the tax year in Cells A1: 6/4/2009 and A2: 5/4/2010
    and ask the user to input dates in Cells B1 and B2 to check if any of these dates (or anything in between) falls between A1 and A2.

    For example: Tax Year is 6th April 2009 - 5th April 2010, Cell A1 is 6/4/2009 and A2 is 5/4/2010. User inputs 2nd March 2009 in Cell B1 and 10th May 2009 in B2. Because the 10th May falls in the tax year the output should be "True"

    I can Excel to check one user defined number (Cell B1) using this =IF(AND(B1>=A1,B1<=A2),"Yes","No") but not sure which route to take to check 2 numbers B1 & B2 and anything in between.

    Any suggestions would be more than welcome.
    Last edited by gdbutcher; 07-12-2009 at 04:53 PM. Reason: Solved

  2. #2
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Check If 2 dates (or any dates in between) fall in Tax Year

    Please Login or Register  to view this content.
    This formula tests if any of the test range dates fall within the tax year:

    Please Login or Register  to view this content.
    Is that something you can work with?
    Last edited by Ron Coderre; 07-10-2009 at 11:30 PM. Reason: Edit_1: Used wrong formula, Edit_2: Used correct formula
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    07-10-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Check If 2 dates (or any dates in between) fall in Tax Year

    Yes, thats excellent thanks very 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