+ Reply to Thread
Results 1 to 2 of 2

need vba code for making 3 month intervals (quarters) using date

  1. #1
    Registered User
    Join Date
    12-22-2015
    Location
    NJ
    MS-Off Ver
    14.5.9 MS 2011
    Posts
    2

    need vba code for making 3 month intervals (quarters) using date

    Hi,

    I'm new to this forum and can't figure out how to do something. I have six years of data that contain dates for when certain events happened (dd/mm/yyyy). I need to create variables indicating when those events happened by 3 month intervals (quarters), BUT I need those quarters to range from 1-24. For example, for 2009 the first 4 variables would be 1-4, but the the first quarter for 2010 would be 5, second quarter would be 6, etc.

    The current code I have is =ROUNDUP(MONTH(F2)/3,0) where F2 is my date, but this only returns 1-4 within 2009, 2010, etc individually, and I need them 1-24. Does anyone know if there's a way to do this? I've been searching online and asking friends and I can't figure it out, so any help is really appreciated!

    Thanks and Happy Holidays!!!

  2. #2
    Registered User
    Join Date
    12-22-2015
    Location
    NJ
    MS-Off Ver
    14.5.9 MS 2011
    Posts
    2

    Re: need vba code for making 3 month intervals (quarters) using date

    Figured it out with the help from some anonymous person: Just add to your formula +4*(YEAR(F2)-2009)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Bar Chart of Quarters when data is by month?
    By scopo911 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-16-2014, 02:34 PM
  2. [SOLVED] Revolving Date Anniversaries (6 Month Intervals)
    By switzd0d in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-14-2014, 04:51 PM
  3. Replies: 5
    Last Post: 09-28-2013, 04:32 AM
  4. [SOLVED] Making a cell give the date the fist monday of the month
    By frankday in forum Excel General
    Replies: 10
    Last Post: 09-30-2012, 06:53 PM
  5. Looping Generating Specific Dates in Six Month Intervals between end and start date
    By LenaJ887 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-16-2010, 02:59 AM
  6. Replies: 1
    Last Post: 05-17-2006, 05:35 AM
  7. [SOLVED] How can I set month/quarter/annual date intervals
    By John in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-15-2006, 12:35 AM

Tags for this Thread

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