Results 1 to 3 of 3

Using month in calculation ONLY if current year is 2009.

Threaded View

  1. #1
    Registered User
    Join Date
    12-02-2008
    Location
    Saskatchewan, Canada
    Posts
    4

    Using month in calculation ONLY if current year is 2009.

    I'm calculating sick days on an Attendance Report.
    - Sick days accumulate at a rate of 1.25 per month.
    - Employees will carry-forward unused sick days from 2008.
    - The maximum sick days is 30.

    In trying to create a formula that will multiple the current month (eg Dec=12) by 1.25, subtract any sick days taken YTD (S16), and add the carry-forward days from 2008 (W16), I noticed one problem with the following formula:

    =IF(SUM(W16+(MONTH(TODAY())*1.25)-S16)>30,30,SUM(W16+(MONTH(TODAY())*1.25)-S16))
    - the problem is if the supervisor reviews the information in Jan'10, the whole calculation changes.

    I've used an IF stmt to limit the calculations to the year 2009, and then default to 15 (1.25 * 12). Does anyone see any reason why this wouldn't work??

    =IF(SUM(W16+(IF(YEAR(TODAY())=2009,MONTH(TODAY())*1.25-S16,15)))>30,30,SUM(W16+(IF(YEAR(TODAY())=2009,MONTH(TODAY())*1.25)-S16),15))
    Any help is much appreciated. Thanks!
    Last edited by NBVC; 12-03-2008 at 06:12 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1