Re: Formula for current month minus one = Quarter number in a macr

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Pank" <Pank@xxxxxxxxxxxxxxxxxxxxxxxxx> skrev i melding
news:22DE3522-7970-490D-8F3D-B58A51C3E2DE@xxxxxxxxxxxxxxxx
> '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


.



Relevant Pages

  • Re: Worlds first online juggling convention?
    ... Mobius wrote: ... Just to clarify, 155 is the lowest possible value, being in base 13 (To ... i.e. conventionally the names are constant across all bases and the digit ... representations change, rather than the other way around. ...
    (rec.juggling)
  • Re: Worlds first online juggling convention?
    ... Mobius wrote: ... Just to clarify, 155 is the lowest possible value, being in base 13 (To ... i.e. conventionally the names are constant across all bases and the digit ... representations change, rather than the other way around. ...
    (rec.juggling)
  • Re: Cardinality of Set of Computable Numbers?
    ... > Any enlightenment will be appreciated. ... whose n-th digit is different from the n-th digit of n-th member of the ... Can you clarify your argument to explain what you mean by the diagonal ... Even if you are talking about computable reals, say between 0 and 1, you ...
    (comp.theory)
  • Re: Christmas offer for SecureBlackbox, MsgConnect and Solid File System
    ... Such a sheltered life:) ... > DD> Doh! ... > Can you clarify this please? ... > abbreviations. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Rational numbers in PI
    ... KHolmes wrote: ... so I'll clarify: gis the decimal number formed by taking ... every nth digit of the decimal expansion of pi. ... It looks to me that gconsists of the ...
    (sci.math)