+ Reply to Thread
Results 1 to 3 of 3

Rolling 12 Month

  1. #1
    Registered User
    Join Date
    02-27-2006
    Posts
    20

    Rolling 12 Month

    Hi all
    I am trying to monitor days over a rolling 12 month period so that I can see on a day by day basis the total number of holidays taken from one day to the next ie. 19/1/06 to 19/1/07. I have a sheet with the dates in column A with either a 1 or a 0 in column B with 1 meaning holiday taken on that date.
    Eg

    A B C
    1st 0 =today()-5
    2nd 1 =total hols
    3rd 1
    4th 0
    5th 1
    6th 1
    7th 1
    8th 0
    9th 0
    10th 0

    Lets say todays date is the 10th, that would mean I would like to sum the total hols taken between the 5th and the 10th,because of Today()-5, which would =3. If today was the 7th the total would be 5. Obviously Today()-5 would become -365 for the year. I have a formula in C2=IF((A5=C1),SUM(B5:B10),0), but this is only looking at one date cell (A5). I would like to count all the holidays back from the current date and put the result in C2.
    I hope anyone can understand what I am trying to achieve. If further clarification is needed please say.
    Thanks
    Last edited by Reefaman; 01-19-2007 at 12:21 AM.

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    well it is not clear from your example, which is why you may not have a reply yet. If everyday in the year appears you can just sum the column selecting the previous 365 rows and as you copy the formula down it adjusts


    or look at sumproduct((range of dates<=today())*(range of dates>today()-365)*(range of holidays))

    so perhaps

    =sumproduct((a1:a1000<=today())*(a1:a1000>today()-365)*(b1:b1000))


    Regards

    Dav

  3. #3
    Registered User
    Join Date
    02-27-2006
    Posts
    20
    Hi Dav
    Thanks for the reply, but after trying a few things I eventually came up with a solution that appears to work. {=SUM((A1:A10>=C1)*(A1:A10<=C3)*(B1:B10))}. I had to add cell C3 to include todays date.
    Thanks again.

+ Reply to Thread

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