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

nlink222

New Member
Joined
Dec 22, 2015
Messages
4
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!!!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top