+ Reply to Thread
Results 1 to 3 of 3

Determine Date Quarter

Hybrid View

  1. #1
    Forum Contributor Tarball's Avatar
    Join Date
    04-21-2007
    Location
    Atlanta, GA
    Posts
    166

    Determine Date Quarter

    Given the following following fiscal year intervals:

    The dates are set via calendar control but would be static through the fiscal year.
    Q1= 9/27/2009 - 12/26/2009
    Q2=12/27/2009 - 3/27/2010
    Q3=3/28/2010 - 6/28/2010
    Q4=6/27/2010 - 9/26/2010

    Given input as a date (either before the interval above, inside the interval, or outside of the interval), I need to determine what Quarter the input date would fall into.

    Example:
    Given 03/31/2007 I need to return Q2 2007 (2007 fiscal year)
    Given 09/28/2006 I need to return Q1 2007 (2007 fiscal year)

    Given 9/27/2009 I need to return Q1 2009

    Any ideas how I can do this in VBA?
    Reach me at excel_help at bellsouth dot net

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Determine Date Quarter

    The attached sheet shows the dates in a table.

    The coloured columns are formulas to pull back any of the information

    Note it actually only tests on start date. The assumption is that the start date of one period is the day after the close of another period.
    Attached Files Attached Files


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    Forum Contributor Tarball's Avatar
    Join Date
    04-21-2007
    Location
    Atlanta, GA
    Posts
    166

    Re: Determine Date Quarter

    Thanks so much. You have given me several new ideas. I was stuck. I really appreciate the help.

+ 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