View Single Post
  #9   Report Post  
Harald Staff
 
Posts: n/a
Default

"Pank" skrev i melding
...
'MyQ = 1 + Int(Month(DateSerial(Year(Date), Month(Date) - 1, 1)) / 4)

Can you please clarify whether the digit 4 is correct or should it be 3 to
represent quarters (i.e. every 3 months)?


Doh ! Really sorry about that. This is more like what I intended:

MyQ = 1 + Int((Month(DateSerial(Year(Date), Month(Date) - 1, 1)) - 1) / 3)

it will return for each month
jan 4
feb 1
mar 1
apr 1
may 2
jun 2
jul 2
aug 3
sep 3
oct 3
nov 4
dec 4
but it may not be what you wanted.

Best wishes Harald