Month in formula

  • Thread starter Thread starter Smilingmom
  • Start date Start date
S

Smilingmom

I have a formula where I calculate the number of hour accrued based on the
month of the year. Currently, I have to physically go in and change the
number. Is there a formula I can add to this to make it change automatically
based on the current month? The formula is below where X is the current
month (number).

=(6.67*X)-0.04

Thanks for the help!
 
Smilingmom said:
Is there a formula I can add to this to make it
change automatically based on the current month?
Yes.


The formula is below where X is the current
month (number).
=(6.67*X)-0.04

The precise answer depends on what "X" is.

If "X" is a reference to a cell that contains a date serial number (i.e. a
bona date, not text), then perhaps:

=6.67*MONTH(A1)-0.04

But if "X" is simply a relative position in a column starting with A1, then
perhaps:

=6.67*(ROW()-ROW($A$1))-0.04

Aside.... You might want to reconsider the use of decimal fractions like
..67 and 0.04. If those dollar-and-cents fails, fine. But if they are your
approximations for rational fractions, it would be better to use the rational
fractions, perhaps explicitly rounding the result to dollars and cents. For
example:

=ROUND((6+2/3)*MONTH(A1) - 1/25, 2)


----- original message -----
 
Back
Top