+ Reply to Thread
Results 1 to 5 of 5

Sum Weekend and Holiday Values Based on a Date Range in another Cell

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    North Providence, RI
    MS-Off Ver
    Excel 2003
    Posts
    3

    Red face Sum Weekend and Holiday Values Based on a Date Range in another Cell

    Hello,

    I have searched everywhere and can not find what I need. I need to sum weekend and Holiday values only and then the reverse, sum weekday values without holiday values. Here is a breakdown:

    Column A (Dates)
    Wednesday, August 1, 2012
    Thursday, August 2, 2012
    Fridays, August 3, 2012
    (continued through to Monday, September 3, 2012)

    Column B (Values)
    Column C (Holiday Dates, defined as Holidays Range)

    I can sum weekend values using:
    =sumproduct(--(weekday(a2:a35,2)>5),(b2:b35))

    I can sum the 1st Holiday value by using:
    =SUMIF(A2:A35,Holidays,b2:b35) --> But, it does not loop through all the Holiday dates to produce a total sum.

    The below formula returns a True value and it does loop through all the Holiday dates, but does not return the values in Column B:
    =OR(SUM(b2:b35,MATCH(Holidays,A2:A35,0)))

    Any help or suggestions is greatly appreciated.

    I have attached a small sample of a larger workbook.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Sum Weekend and Holiday Values Based on a Date Range in another Cell

    This will sum the holiday values in your example:

    Please Login or Register  to view this content.
    Last edited by CheshireCat; 07-27-2012 at 11:45 AM. Reason: modified to exclude weekends

  3. #3
    Registered User
    Join Date
    07-26-2012
    Location
    North Providence, RI
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sum Weekend and Holiday Values Based on a Date Range in another Cell

    Thank you. It does sum the Holiday values. But, is it possible to combine your formula with what I have to sum weekend and Holiday together? Also, how can I subtract the Holiday values from my weekday values?

  4. #4
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Sum Weekend and Holiday Values Based on a Date Range in another Cell

    Sure,

    This sums the holiday and weekend values:

    Please Login or Register  to view this content.
    and this sums the weekday values:

    Please Login or Register  to view this content.
    finally, this sums the weekday values and subtracts the holiday values:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-26-2012
    Location
    North Providence, RI
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sum Weekend and Holiday Values Based on a Date Range in another Cell

    Thank you so much! You have no idea how crazy this has been making me.

+ 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