View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve Steve is offline
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



.