SUMPRODUCT

P

Pete

I use the following formula to sum the amount of downtime
incurred between two times from column A & column B the
time lost is in column E

=SUMPRODUCT(--($A$12:$A$19>=A5),--($B$12:$B$19<=B5),--
($E$12:$E$19))

what I would like to do is sum any downtime (col E)
incurred between the above times (col A & col B) if
Z12:Z19 equals any of the values (text) from
PlannedDownTime (named range)

hope this makes sense

Pete
 
B

Biff

Hi!

You can't use a named range in the context of OR like that.

You would need to list the individual conditions like this:

=SUMPRODUCT((A12:A19>=A5)*(B12:B19<=B5)*(Z12:Z19=
{"A","B","C"})*E12:E19)

Using the double unary in the above formula results in a
#VALUE! error so the need for multiplication of the arrays.

Biff
 
A

Aladin Akyurek

Biff said:
Hi!

You can't use a named range in the context of OR like that.

You would need to list the individual conditions like this:

=SUMPRODUCT((A12:A19>=A5)*(B12:B19<=B5)*(Z12:Z19=
{"A","B","C"})*E12:E19)

Using the double unary in the above formula results in a
#VALUE! error so the need for multiplication of the arrays.

That can be re-written as...

=SUMPRODUCT(--(A12:A19>=A5),--(B12:B19<=B5),--ISNUMBER(MATCH(Z12:Z19,
{"A","B","C"},0)),E12:E19)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sumproduct 1
Subtotal formula 2
Subtract times? 2
Sumproduct formula needed 2
Sumproduct question 1
Sumproduct problem. 7
Sum with multiple conditions - sumproduct, dsum or dproduct? 3
Sumproduct question? 3

Top