Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
aac aac is offline
external usenet poster
 
Posts: 10
Default sumproduct with criterias

Iv got the following code:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),$D$10:$D$5000)

P3 is date from
R3 is date to
col A is date
col B is name
col D is hours
That gives me a breakdown of hours for both clients.

I need to further brake the hours down to find out what hours the clients
used under 20 hours and over as well.

--
aac
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 364
Default sumproduct with criterias

"aac" wrote in message
...
Iv got the following code:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),$D$10:$D$5000)

P3 is date from
R3 is date to
col A is date
col B is name
col D is hours
That gives me a breakdown of hours for both clients.

I need to further brake the hours down to find out what hours the clients
used under 20 hours and over as well.

--
aac


Add another condition to your SUMPRODUCT formula:
--($D$10:$D$5000<20)
will only add hours which are <20, whilst
--($D$10:$D$500020)
will add hours greater than 20.

However, you should include the =20 case in one or the other, so use
--($D$10:$D$5000<20) and --($D$10:$D$5000=20)
or
--($D$10:$D$5000<=20) and --($D$10:$D$500020)


  #3   Report Post  
Posted to microsoft.public.excel.misc
aac aac is offline
external usenet poster
 
Posts: 10
Default sumproduct with criterias

Hi Stephen,
Thanks for that. But its not quit there. At the moment it sum any single
value under 20 and over 20. I need it to sum under a running total of 20.
Give you more info, single entries could be anything from 5 minutes upwards.
So its a cumulative total. I do have a col E10 to E5000 which keeps a running
total.

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002)--($E$10:$E$5000<20)--($E$10:$E$5000=20),$D$10:$D$5000)
Have I added them in the right place?

--
aac


"Stephen" wrote:

"aac" wrote in message
...
Iv got the following code:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),$D$10:$D$5000)

P3 is date from
R3 is date to
col A is date
col B is name
col D is hours
That gives me a breakdown of hours for both clients.

I need to further brake the hours down to find out what hours the clients
used under 20 hours and over as well.

--
aac


Add another condition to your SUMPRODUCT formula:
--($D$10:$D$5000<20)
will only add hours which are <20, whilst
--($D$10:$D$500020)
will add hours greater than 20.

However, you should include the =20 case in one or the other, so use
--($D$10:$D$5000<20) and --($D$10:$D$5000=20)
or
--($D$10:$D$5000<=20) and --($D$10:$D$500020)



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 364
Default sumproduct with criterias

For what I thought you wanted, what I intended was two separate formulas,
one with a condition <20 and the other with a condition =20, like this:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),--($E$10:$E$5000<20),$D$10:$D$5000)

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),--($E$10:$E$5000=20),$D$10:$D$5000)

You had both conditions in the same formula - both cannot be true together!
Also, you had missed some commas.

But I'm afraid I'm baffled as to whether or not this is what you are trying
to calculate.

"aac" wrote in message
...
Hi Stephen,
Thanks for that. But its not quit there. At the moment it sum any single
value under 20 and over 20. I need it to sum under a running total of 20.
Give you more info, single entries could be anything from 5 minutes
upwards.
So its a cumulative total. I do have a col E10 to E5000 which keeps a
running
total.

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002)--($E$10:$E$5000<20)--($E$10:$E$5000=20),$D$10:$D$5000)
Have I added them in the right place?

--
aac


"Stephen" wrote:

"aac" wrote in message
...
Iv got the following code:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),$D$10:$D$5000)

P3 is date from
R3 is date to
col A is date
col B is name
col D is hours
That gives me a breakdown of hours for both clients.

I need to further brake the hours down to find out what hours the
clients
used under 20 hours and over as well.

--
aac


Add another condition to your SUMPRODUCT formula:
--($D$10:$D$5000<20)
will only add hours which are <20, whilst
--($D$10:$D$500020)
will add hours greater than 20.

However, you should include the =20 case in one or the other, so use
--($D$10:$D$5000<20) and --($D$10:$D$5000=20)
or
--($D$10:$D$5000<=20) and --($D$10:$D$500020)





  #5   Report Post  
Posted to microsoft.public.excel.misc
aac aac is offline
external usenet poster
 
Posts: 10
Default sumproduct with criterias

Sorry Stephen, Its hard to explain.
Here is a sample of my sheet ("Main"). Sheet2 is just a summary sheet.

A B D E
Date Client Hours Total hours
5-Sep-07 A 5:20 5:20
7-Sep-07 B 5:15 10:35
8-Sep-07 A 10:05 20:40
9-Sep-07 B 0:35 21:15
9-Sep-07 B 7:40 28:55
9-Sep-07 A 0:15 29:10
and so on.....
I am after a formula that would extract the following:

sheet2:
cell H9: Client "A" hours under 21:00 (from col E) = 15:25 hours
cell N9: Client "B" hours under 21:00 (from col E) = 5:35 hours

cell H11: Client "A" hours over 21:00 (from col E) = 0:15 hours
cell N11: Client "B" hours over 21:00 (from col E) = 7:55 hours

I hope this helps. If you wish more info please do not hesitate in asking
for it.

Thank you.

--
aac


"Stephen" wrote:

For what I thought you wanted, what I intended was two separate formulas,
one with a condition <20 and the other with a condition =20, like this:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),--($E$10:$E$5000<20),$D$10:$D$5000)

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),--($E$10:$E$5000=20),$D$10:$D$5000)

You had both conditions in the same formula - both cannot be true together!
Also, you had missed some commas.

But I'm afraid I'm baffled as to whether or not this is what you are trying
to calculate.

"aac" wrote in message
...
Hi Stephen,
Thanks for that. But its not quit there. At the moment it sum any single
value under 20 and over 20. I need it to sum under a running total of 20.
Give you more info, single entries could be anything from 5 minutes
upwards.
So its a cumulative total. I do have a col E10 to E5000 which keeps a
running
total.

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002)--($E$10:$E$5000<20)--($E$10:$E$5000=20),$D$10:$D$5000)
Have I added them in the right place?

--
aac


"Stephen" wrote:

"aac" wrote in message
...
Iv got the following code:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),$D$10:$D$5000)

P3 is date from
R3 is date to
col A is date
col B is name
col D is hours
That gives me a breakdown of hours for both clients.

I need to further brake the hours down to find out what hours the
clients
used under 20 hours and over as well.

--
aac

Add another condition to your SUMPRODUCT formula:
--($D$10:$D$5000<20)
will only add hours which are <20, whilst
--($D$10:$D$500020)
will add hours greater than 20.

However, you should include the =20 case in one or the other, so use
--($D$10:$D$5000<20) and --($D$10:$D$5000=20)
or
--($D$10:$D$5000<=20) and --($D$10:$D$500020)








  #6   Report Post  
Posted to microsoft.public.excel.misc
aac aac is offline
external usenet poster
 
Posts: 10
Default sumproduct with criterias

I forgot to mention also in sheet 2:
P3 is date from
R3 is date to
--
aac


"aac" wrote:

Sorry Stephen, Its hard to explain.
Here is a sample of my sheet ("Main"). Sheet2 is just a summary sheet.

A B D E
Date Client Hours Total hours
5-Sep-07 A 5:20 5:20
7-Sep-07 B 5:15 10:35
8-Sep-07 A 10:05 20:40
9-Sep-07 B 0:35 21:15
9-Sep-07 B 7:40 28:55
9-Sep-07 A 0:15 29:10
and so on.....
I am after a formula that would extract the following:

sheet2:
cell H9: Client "A" hours under 21:00 (from col E) = 15:25 hours
cell N9: Client "B" hours under 21:00 (from col E) = 5:35 hours

cell H11: Client "A" hours over 21:00 (from col E) = 0:15 hours
cell N11: Client "B" hours over 21:00 (from col E) = 7:55 hours

I hope this helps. If you wish more info please do not hesitate in asking
for it.

Thank you.

--
aac


"Stephen" wrote:

For what I thought you wanted, what I intended was two separate formulas,
one with a condition <20 and the other with a condition =20, like this:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),--($E$10:$E$5000<20),$D$10:$D$5000)

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),--($E$10:$E$5000=20),$D$10:$D$5000)

You had both conditions in the same formula - both cannot be true together!
Also, you had missed some commas.

But I'm afraid I'm baffled as to whether or not this is what you are trying
to calculate.

"aac" wrote in message
...
Hi Stephen,
Thanks for that. But its not quit there. At the moment it sum any single
value under 20 and over 20. I need it to sum under a running total of 20.
Give you more info, single entries could be anything from 5 minutes
upwards.
So its a cumulative total. I do have a col E10 to E5000 which keeps a
running
total.

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002)--($E$10:$E$5000<20)--($E$10:$E$5000=20),$D$10:$D$5000)
Have I added them in the right place?

--
aac


"Stephen" wrote:

"aac" wrote in message
...
Iv got the following code:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),$D$10:$D$5000)

P3 is date from
R3 is date to
col A is date
col B is name
col D is hours
That gives me a breakdown of hours for both clients.

I need to further brake the hours down to find out what hours the
clients
used under 20 hours and over as well.

--
aac

Add another condition to your SUMPRODUCT formula:
--($D$10:$D$5000<20)
will only add hours which are <20, whilst
--($D$10:$D$500020)
will add hours greater than 20.

However, you should include the =20 case in one or the other, so use
--($D$10:$D$5000<20) and --($D$10:$D$5000=20)
or
--($D$10:$D$5000<=20) and --($D$10:$D$500020)






  #7   Report Post  
Posted to microsoft.public.excel.misc
aac aac is offline
external usenet poster
 
Posts: 10
Default sumproduct with criterias

Thank you for your attention. I shall keep an eye on this post for any reply.
But in the meantime I shall repost this question.
--
aac


"aac" wrote:

I forgot to mention also in sheet 2:
P3 is date from
R3 is date to
--
aac


"aac" wrote:

Sorry Stephen, Its hard to explain.
Here is a sample of my sheet ("Main"). Sheet2 is just a summary sheet.

A B D E
Date Client Hours Total hours
5-Sep-07 A 5:20 5:20
7-Sep-07 B 5:15 10:35
8-Sep-07 A 10:05 20:40
9-Sep-07 B 0:35 21:15
9-Sep-07 B 7:40 28:55
9-Sep-07 A 0:15 29:10
and so on.....
I am after a formula that would extract the following:

sheet2:
cell H9: Client "A" hours under 21:00 (from col E) = 15:25 hours
cell N9: Client "B" hours under 21:00 (from col E) = 5:35 hours

cell H11: Client "A" hours over 21:00 (from col E) = 0:15 hours
cell N11: Client "B" hours over 21:00 (from col E) = 7:55 hours

I hope this helps. If you wish more info please do not hesitate in asking
for it.

Thank you.

--
aac


"Stephen" wrote:

For what I thought you wanted, what I intended was two separate formulas,
one with a condition <20 and the other with a condition =20, like this:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),--($E$10:$E$5000<20),$D$10:$D$5000)

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),--($E$10:$E$5000=20),$D$10:$D$5000)

You had both conditions in the same formula - both cannot be true together!
Also, you had missed some commas.

But I'm afraid I'm baffled as to whether or not this is what you are trying
to calculate.

"aac" wrote in message
...
Hi Stephen,
Thanks for that. But its not quit there. At the moment it sum any single
value under 20 and over 20. I need it to sum under a running total of 20.
Give you more info, single entries could be anything from 5 minutes
upwards.
So its a cumulative total. I do have a col E10 to E5000 which keeps a
running
total.

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002)--($E$10:$E$5000<20)--($E$10:$E$5000=20),$D$10:$D$5000)
Have I added them in the right place?

--
aac


"Stephen" wrote:

"aac" wrote in message
...
Iv got the following code:

=SUMPRODUCT(--($A$10:$A$5000=Sheet2!P$3),--($A$10:$A$5000<=Sheet2!R$3),--($B$10:$B$5000=MAIN!B5002),$D$10:$D$5000)

P3 is date from
R3 is date to
col A is date
col B is name
col D is hours
That gives me a breakdown of hours for both clients.

I need to further brake the hours down to find out what hours the
clients
used under 20 hours and over as well.

--
aac

Add another condition to your SUMPRODUCT formula:
--($D$10:$D$5000<20)
will only add hours which are <20, whilst
--($D$10:$D$500020)
will add hours greater than 20.

However, you should include the =20 case in one or the other, so use
--($D$10:$D$5000<20) and --($D$10:$D$5000=20)
or
--($D$10:$D$5000<=20) and --($D$10:$D$500020)






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
SUMPRODUCT with 2 criterias Krish Excel Worksheet Functions 4 November 7th 07 08:18 PM
Too many criterias... [email protected] Excel Worksheet Functions 12 June 14th 07 02:42 PM
If Criterias Ricardo Excel Discussion (Misc queries) 3 April 5th 07 01:06 PM
Additional Sumproduct Criterias lacosta Excel Worksheet Functions 3 October 3rd 05 09:55 PM
Sumif or Sumproduct 2 criterias not working SMac Excel Discussion (Misc queries) 5 February 28th 05 07:55 PM


All times are GMT +1. The time now is 07:11 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"