user3287522
user3287522

Reputation: 55

Is there an Excel function to work out which month in the Quarter

Is there a function in excel that helps you to work out if you're in the first, second or third month in a quarter 1,2,3?

Upvotes: 1

Views: 67

Answers (1)

Gary's Student
Gary's Student

Reputation: 96753

You can use:

=MOD(MONTH(TODAY())-1,3)+1

Here is an example for dates in column A:

enter image description here

EDIT#1:

In VBA:

Public Function quartre(d As Date) As Integer
    Dim m As Integer
    m = Month(d)
    quartre = ((m - 1) Mod 3) + 1
End Function

Upvotes: 5

Related Questions