+ Reply to Thread
Results 1 to 4 of 4

Sumproduct for multiple months

  1. #1
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Sumproduct for multiple months

    Hi

    I am using the below formula to calculate how many staff have been sick in April 2010 with cold/flu.

    =SUMPRODUCT(--(TEXT(ARCHIVE!$H$4:$H$10000,"MMMYYYY")="APR2010")*(ARCHIVE!$G$4:$G$10000="Cold/Flu"))

    Is there any way I can extend this formula to calculate how many staff have been off with cold/flu in April, May and June?

    Thanks
    Last edited by NBVC; 09-28-2010 at 10:37 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sumproduct for multiple months

    Perhaps:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sumproduct for multiple months

    Try:

    =SUMPRODUCT(--(TEXT(ARCHIVE!$H$4:$H$10000,"MMMYYYY")={"APR2010","MAY2010","JUN2010"})*(ARCHIVE!$G$4:$G$10000="Cold/Flu"))

    or

    =SUMPRODUCT((YEAR(ARCHIVE!$H$4:$H$10000)=2010)*(MONTH(ARCHIVE!$H$4:$H$10000)>=4)*(MONTH(ARCHIVE!$H$4:$H$10000)<=6)*(ARCHIVE!$G$4:$G$10000="Cold/Flu"))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Sumproduct for multiple months

    Thank you so much, I think that has worked!

+ 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