Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default SUM/ Count Only weekdays

I have read a lot of the posts and a lot are close but not quite what i am
looking for.

Scenario: I have a spreadsheet to sum up total hours for the month as well
as count all the days of the month. The spreadsheet is set up for example
row1: dates 11-1 through 11-30 (alternating columns) dates are merged over 2
columns
row 2: Hours then OT (i.e. b2 is Hours, b3 is OT) and that continues along
row B to the Nov 30 date.
row 3: user name and the data for hours and OT per day (i.e. b2= 8, b3=2)
SUMPRODUCT(--($F$21:$BY$21=$F$21),--($F$22:$BY$220))) F21="Hours" and row
22 is the actual data. My problem is that if there is a Sat or sun worked
this calculation adds those days in as well as they are 0.

the other question has to do with the sum of those. How can i get 1 function
to only sum the weekdays and another function to sum the weekends?

I know it is a little confusing without pictures but any help would be
appreciated.

WHat i am trying to do is have a weekly summary of all hours where Mon- Fri
is Regular Hours and OT/ Sat/ Sun columns add up as OT. And at the same time
count the total days worked on a running total.

I have the running total by using networkdays function - the today( ) function

I know that with multiple conditions the sumproduct is usually used but i
seem to be having some issues, this is the formula i have currently for
counting.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default SUM/ Count Only weekdays

Hi,

I'm running this is the vertical direction but the idea is the same.

=SUMPRODUCT(--(MOD(A1:A31,7)1),B1:B31)

Sums weekdays

=SUMPRODUCT(--(MOD(A1:A31,7)<2),B1:B31)

Sums weekends

--
Thanks,
Shane Devenshire


"Scott Kieta" wrote:

I have read a lot of the posts and a lot are close but not quite what i am
looking for.

Scenario: I have a spreadsheet to sum up total hours for the month as well
as count all the days of the month. The spreadsheet is set up for example
row1: dates 11-1 through 11-30 (alternating columns) dates are merged over 2
columns
row 2: Hours then OT (i.e. b2 is Hours, b3 is OT) and that continues along
row B to the Nov 30 date.
row 3: user name and the data for hours and OT per day (i.e. b2= 8, b3=2)
SUMPRODUCT(--($F$21:$BY$21=$F$21),--($F$22:$BY$220))) F21="Hours" and row
22 is the actual data. My problem is that if there is a Sat or sun worked
this calculation adds those days in as well as they are 0.

the other question has to do with the sum of those. How can i get 1 function
to only sum the weekdays and another function to sum the weekends?

I know it is a little confusing without pictures but any help would be
appreciated.

WHat i am trying to do is have a weekly summary of all hours where Mon- Fri
is Regular Hours and OT/ Sat/ Sun columns add up as OT. And at the same time
count the total days worked on a running total.

I have the running total by using networkdays function - the today( ) function

I know that with multiple conditions the sumproduct is usually used but i
seem to be having some issues, this is the formula i have currently for
counting.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default SUM/ Count Only weekdays

Thanks, i tried it replacing range with my range but am receiving a #value!
answer. Your range provided A1:A31 is the dates of the month and B1:B31 are
the actual data, is this correct?

Thanks

"ShaneDevenshire" wrote:

Hi,

I'm running this is the vertical direction but the idea is the same.

=SUMPRODUCT(--(MOD(A1:A31,7)1),B1:B31)

Sums weekdays

=SUMPRODUCT(--(MOD(A1:A31,7)<2),B1:B31)

Sums weekends

--
Thanks,
Shane Devenshire


"Scott Kieta" wrote:

I have read a lot of the posts and a lot are close but not quite what i am
looking for.

Scenario: I have a spreadsheet to sum up total hours for the month as well
as count all the days of the month. The spreadsheet is set up for example
row1: dates 11-1 through 11-30 (alternating columns) dates are merged over 2
columns
row 2: Hours then OT (i.e. b2 is Hours, b3 is OT) and that continues along
row B to the Nov 30 date.
row 3: user name and the data for hours and OT per day (i.e. b2= 8, b3=2)
SUMPRODUCT(--($F$21:$BY$21=$F$21),--($F$22:$BY$220))) F21="Hours" and row
22 is the actual data. My problem is that if there is a Sat or sun worked
this calculation adds those days in as well as they are 0.

the other question has to do with the sum of those. How can i get 1 function
to only sum the weekdays and another function to sum the weekends?

I know it is a little confusing without pictures but any help would be
appreciated.

WHat i am trying to do is have a weekly summary of all hours where Mon- Fri
is Regular Hours and OT/ Sat/ Sun columns add up as OT. And at the same time
count the total days worked on a running total.

I have the running total by using networkdays function - the today( ) function

I know that with multiple conditions the sumproduct is usually used but i
seem to be having some issues, this is the formula i have currently for
counting.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weekdays Kerryn Excel Discussion (Misc queries) 7 July 5th 08 01:56 AM
Excel Count Weekdays Formula Ziggy M Excel Discussion (Misc queries) 9 July 15th 06 01:03 AM
How do i count number of weekdays between two dates? Sanjay Shah Excel Worksheet Functions 1 April 4th 05 04:40 PM
Weekdays Jeff Excel Discussion (Misc queries) 7 February 15th 05 12:18 AM
count weekdays in a date range benb Excel Worksheet Functions 1 January 13th 05 02:49 PM


All times are GMT +1. The time now is 02:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"