calculated value displayed in increments

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm calculating a value, calculated daily, based on the number of days in two
weeks. How can I get the value to be displayed only in incremements based on
two weeks, instead of showing the daily calculations?

ie- vacation is accrued as 5.77 hours every two weeks.
The formula is
(todays date - beginingof the year)/14 * 5.77

but how do I get the value displayed to only rise in increments of 5.77?

2nd question:
=if(today>holiday, 7.5,0)
the workbook adds 7.5 hrs of "holiday" time to the record if today is past
the day of the holiday. If it is before the holiday, the value is 0.

How do I get it to add the 7.5 if the date falls between two dates, and
otherwise display 0?
ie- christmas 2005 is allowed to be used as a 2006 holiday day until 1/31/06.
How do I get it to add 7.5 if it is between 12/25/05 and 1/31/06, but
display 0 outside of those options?
=if(12/25/05<today<1/31/06,7.5,0) is not working for me.

Thanks.
 
For the first part, you need to calculate the number of two-week periods that
have passed:
=int((today()-date(2005,12,31))/14) (you may need to adjust your 'start
date' slightly). Multiply that by the accrual rate of 5.77.

Second part requires the AND function to combine two logical tests:
=if(and(today()>=date(2005,12,25),today()<=date(2006,1,31)),7.5,0)

HTH. --Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top