+ Reply to Thread
Results 1 to 6 of 6

SUMIFS for weekdays/weekends

  1. #1
    Registered User
    Join Date
    05-25-2012
    Location
    Drnis, Croatia
    MS-Off Ver
    Excel 2010
    Posts
    31

    SUMIFS for weekdays/weekends

    Hey hey,

    i need to get comperison of weekdays vs weekends for each of the months in a year.

    I need a sum of all numbers from column B or C or D that meet the criteria of being in january and being saturday or sunday (in uploaded example).

    ex1.xlsx

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: SUMIFS for weekdays/weekends

    Hi,

    See the attached file.

    I have used a helper column to identify the weekdays and then SUMIFS to calculate the total.

    In I4:
    =SUMIFS($C$1:$C$40,$A$1:$A$40,">="&I$3,$A$1:$A$40,"<="&J$3)-J4

    In J4:
    =SUMIFS($C$1:$C$40,A$1:A$40,">="&I$3,$A$1:$A$40,"<="&J$3,$B$1:$B$40,"Saturday")+SUMIFS($C$1:$C$40,$A$1:$A$40,">="&I$3,$A$1:$A$40,"<="&J$3,$B$1:$B$40,"Sunday")
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-25-2012
    Location
    Drnis, Croatia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: SUMIFS for weekdays/weekends

    Thank you for the response, unfortunatly i'm trying to find a solution without adding columns. Source data is not in the same file and i'm trying to avoid making changes to it. My bad for not mentioning it in original post.

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: SUMIFS for weekdays/weekends

    Sumifs cannot manipulate dates without helper columns.

    You could use an ugly and inefficient array formula to do the job, but expect your computer to grind to a halt if your real data range is much bigger than your example.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *** Must be confirmed as an array formula by using Shift Ctrl and Enter, not just Enter ***

  5. #5
    Registered User
    Join Date
    05-25-2012
    Location
    Drnis, Croatia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: SUMIFS for weekdays/weekends

    Thanks for the response, i guess helper column is the best way to go then.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: SUMIFS for weekdays/weekends

    Here a couple of things that you might want to consider. I have a different layout of the calculations with the months going down columns and the totals arranged across. I am not clear on whether or not you want the 3 columns totalled together or separately for each month so I have given you both the total for all three columns for weekdays and weekends for the three columns for each month and the totals for each column for weekdays and weekends for each month. This is set up to handle 10000 rows of data.
    Dates for both workbooks are set up in columns G and H
    Sample formula without named ranges. This calculates all weekdays for January for all columns:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In the second workbook I have used the same arrangement but have added dynamic named ranges and the output in a table that will total the named ranges as data covering additional months is added to columns A to D. This is set up for 10,000 rows. As a month is added to the data, just click on the last cell of the table (lower right) and hit the tab key. A new row already populated with the calculations will be added.
    This formula is the same calculation as above in the file with named ranges:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. Calculate based on weekdays & weekends
    By Ichigo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2015, 12:37 AM
  2. Turning weekends into weekdays?
    By bobing in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-16-2013, 06:34 AM
  3. Autofill weekdays/skip weekends in a month
    By Sandra A in forum Excel General
    Replies: 2
    Last Post: 11-30-2009, 03:32 PM
  4. WEEKENDS VS. WEEKDAYS
    By TLAngelo in forum Excel General
    Replies: 0
    Last Post: 07-10-2006, 02:04 PM
  5. WEEKENDS VS. WEEKDAYS
    By TLAngelo in forum Excel General
    Replies: 7
    Last Post: 05-12-2006, 12:35 PM
  6. IF statement with Weekends vs. weekdays
    By edwardpestian in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2006, 04:13 PM
  7. [SOLVED] chart only weekdays when data set includes weekends?
    By [email protected] in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-17-2005, 10:05 AM

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