#1   Report Post  
Pete
 
Posts: n/a
Default SUMPRODUCT

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

  #2   Report Post  
Biff
 
Posts: n/a
Default

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

-----Original Message-----
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

.

  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Biff wrote:
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)
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
Can I reference =, <, or > sign in SUMPRODUCT BobT Excel Discussion (Misc queries) 7 February 16th 05 01:58 PM
Another Sumproduct & #N/A problem Dave Davis Excel Worksheet Functions 3 January 10th 05 03:59 PM
Sumproduct ... Empty Cells vs Spaces? Ken Excel Discussion (Misc queries) 9 December 17th 04 08:03 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


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