+ Reply to Thread
Results 1 to 4 of 4

Rollin gYear Formula

Hybrid View

nikkie456 Rollin gYear Formula 01-16-2014, 10:18 AM
Fotis1991 Re: Rollin gYear Formula 01-16-2014, 10:25 AM
nikkie456 Re: Rollin gYear Formula 01-16-2014, 10:53 AM
Fotis1991 Re: Rollin gYear Formula 01-16-2014, 11:22 AM
  1. #1
    Registered User
    Join Date
    09-10-2013
    Location
    Basingstoke, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Rollin gYear Formula

    You guys were great at helping me out last year and I am hoping your expertise can help again.


    I have a spreadsheet for calulating the number of sick days in a rolling year, which is calculated from the last day of sickness. The formula is below - C12 is always the last date of sickness.

    =IF(ISBLANK(C12),0,SUMIF($C$17:$C66,">="&$C12-365,$D$17:$D66))

    Within this formula I also need it to return a value of 0 if the last sick day was more than a year previous...any ideas on what I should do?


    Similiarly, the following formula, calculates the number of times someone has been off sick in a rolling year, again it looks at the last date of sickness, if this was than 12 months previous how can I get a results of 0?

    =COUNTIF(C17:C76,">"&C12-365)
    and
    =IF(ISBLANK(C17),0,COUNTIF(C17:C17,">"&C17-365))

    Any help would be greatly appreciated

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Rollin gYear Formula

    Perhaps...

    Formula: copy to clipboard
    =if(year(c12-365)<>year(today()),0,COUNTIF(C17:C76,">"&C12-365))


    Untested.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    09-10-2013
    Location
    Basingstoke, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Rollin gYear Formula

    I have attached a sample of the file, following the change you suggest it seems to partly work if things are older than a year, but it is now not including the things in the last year.

    I need help with cells C14 and G14 - let me know if I can clarify as don't think i have explained that well
    Attached Files Attached Files
    Last edited by nikkie456; 01-16-2014 at 11:14 AM.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Rollin gYear Formula

    Ok. Let's try these.
    Formula: copy to clipboard

    =IF((TODAY()-365)>C12,0,SUMIF($C$17:$C66,">="&$C12-365,$D$17:$D66))


    Formula: copy to clipboard
    =IF((TODAY()-365)>C12,0,COUNTIF(C17:C76,">"&C12-365))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM
  2. Code to calculate the last 720 valid hours THEN give a rollin average of the data
    By joeyheaf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2012, 02:39 PM

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