Home > Software engineering >  How to identify with a formula in excel if it is the 1st 2nd 3rd month in quarter?
How to identify with a formula in excel if it is the 1st 2nd 3rd month in quarter?

Time:10-24

I'm trying to find a formula to identify if a month it is the 1st 2nd 3rd month in quarter

I tried with MOD(MONTH(A1),3), but the 3rd month in the quarter is shown as zero

enter image description here

I can use a condition where IF(MOD(MONTH(A1),3)=0,3,MOD(MONTH(A1),3)), but I'm wondering if there is something a bit more straightforward.

CodePudding user response:

=MOD(MONTH(A1)-1,3) 1 As MOD calculates the remainder we need to extract 1 from the month and later add 1 to avoid 0 value.

  • Related