Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Summing 2 columns based on variables

This replicates through hundreds of rows.
I need the total hours scheduled by day based on the 0 or 1s in the cloumns
, and the # of variable hours in the z column.
In the following, in cell S2, I need a formula to look at S5, if it's a
zero, then 0, if it's a 1, then add whatever is in the z column ( in this
case an 8), then to add up all the S column cells based on if there' a 1 in
that column, then whatever the Z column shows. In this scenario, cell S1
would have 18, because 1's are in 7,8 &9 -SUM(Z7:Z9). And U2 would have 24,
because 1's are in 5,6,& 8, - Z5+Z6+Z8, etc.

s t u v w x y
z
4 Sat Sun Mon Tue Wed Thu Fri hrs
5 0 0 1 1 1 1 1 8
6 0 0 1 1 1 1 1 8
7 1 0 0 1 1 1 1 5
8 1 1 1 1 1 0 0 8
9 1 1 0 0 1 1 1 5

18 13 24 29 34 26 26

Much thanks,

Steve
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Summing 2 columns based on variables

=SUMPRODUCT(S5:S9,$Z5:$Z9)

--
Best Regards,

Luke M
"Steve" wrote in message
...
This replicates through hundreds of rows.
I need the total hours scheduled by day based on the 0 or 1s in the
cloumns
, and the # of variable hours in the z column.
In the following, in cell S2, I need a formula to look at S5, if it's a
zero, then 0, if it's a 1, then add whatever is in the z column ( in this
case an 8), then to add up all the S column cells based on if there' a 1
in
that column, then whatever the Z column shows. In this scenario, cell S1
would have 18, because 1's are in 7,8 &9 -SUM(Z7:Z9). And U2 would have
24,
because 1's are in 5,6,& 8, - Z5+Z6+Z8, etc.

s t u v w x y
z
4 Sat Sun Mon Tue Wed Thu Fri hrs
5 0 0 1 1 1 1 1 8
6 0 0 1 1 1 1 1 8
7 1 0 0 1 1 1 1 5
8 1 1 1 1 1 0 0 8
9 1 1 0 0 1 1 1 5

18 13 24 29 34 26 26

Much thanks,

Steve



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Summing 2 columns based on variables

Perfect. Much thanks. I didn't expect it to be that simple.

Thanks again,

Steve

"Luke M" wrote:

=SUMPRODUCT(S5:S9,$Z5:$Z9)

--
Best Regards,

Luke M
"Steve" wrote in message
...
This replicates through hundreds of rows.
I need the total hours scheduled by day based on the 0 or 1s in the
cloumns
, and the # of variable hours in the z column.
In the following, in cell S2, I need a formula to look at S5, if it's a
zero, then 0, if it's a 1, then add whatever is in the z column ( in this
case an 8), then to add up all the S column cells based on if there' a 1
in
that column, then whatever the Z column shows. In this scenario, cell S1
would have 18, because 1's are in 7,8 &9 -SUM(Z7:Z9). And U2 would have
24,
because 1's are in 5,6,& 8, - Z5+Z6+Z8, etc.

s t u v w x y
z
4 Sat Sun Mon Tue Wed Thu Fri hrs
5 0 0 1 1 1 1 1 8
6 0 0 1 1 1 1 1 8
7 1 0 0 1 1 1 1 5
8 1 1 1 1 1 0 0 8
9 1 1 0 0 1 1 1 5

18 13 24 29 34 26 26

Much thanks,

Steve



.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Summing 2 columns based on variables

Your welcome. It helped having a nice setup on your part.

--
Best Regards,

Luke M
"Steve" wrote in message
...
Perfect. Much thanks. I didn't expect it to be that simple.

Thanks again,

Steve

"Luke M" wrote:

=SUMPRODUCT(S5:S9,$Z5:$Z9)

--
Best Regards,

Luke M
"Steve" wrote in message
...
This replicates through hundreds of rows.
I need the total hours scheduled by day based on the 0 or 1s in the
cloumns
, and the # of variable hours in the z column.
In the following, in cell S2, I need a formula to look at S5, if it's a
zero, then 0, if it's a 1, then add whatever is in the z column ( in
this
case an 8), then to add up all the S column cells based on if there' a
1
in
that column, then whatever the Z column shows. In this scenario, cell
S1
would have 18, because 1's are in 7,8 &9 -SUM(Z7:Z9). And U2 would have
24,
because 1's are in 5,6,& 8, - Z5+Z6+Z8, etc.

s t u v w x y
z
4 Sat Sun Mon Tue Wed Thu Fri hrs
5 0 0 1 1 1 1 1 8
6 0 0 1 1 1 1 1 8
7 1 0 0 1 1 1 1 5
8 1 1 1 1 1 0 0 8
9 1 1 0 0 1 1 1 5

18 13 24 29 34 26 26

Much thanks,

Steve



.



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
Summing one column based on criteria from two other columns glinishmak Excel Worksheet Functions 2 November 7th 09 02:30 AM
Summing cells based on mulitiple criteria over mulitple columns troy00 Excel Discussion (Misc queries) 1 October 17th 09 05:35 PM
Summing based off different columns Ag Excel Worksheet Functions 3 September 2nd 08 07:26 PM
Summing specific Columns based on Criteria [email protected] Excel Discussion (Misc queries) 4 June 1st 07 03:20 PM
summing cells with variables jeff Excel Discussion (Misc queries) 5 March 3rd 05 07:25 PM


All times are GMT +1. The time now is 03:35 PM.

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"