Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF and {multiple criteria}

Can anyone help me to understand why this formula gives the correct
result:
=(SUMPRODUCT((Region="Asia")*(DECONS="Ontime")*(SP LIT={"E","W"}))
+SUMPRODUCT((Region="Asia")*(DECONS="Ontime from
ETA")*(SPLIT={"E","W"})))

But if I try to condense it further to:
=SUMPRODUCT((Region="Asia")*(DECONS={"Ontime from
ETA","Ontime"})*(SPLIT={"E","W"}))

It stops working?

Seems to me that, if it can manage to look for either "E" or "W" in a
single SUMPRODUCT, why can't it also look for "Ontime" or "Ontime from
ETA" in the same SUMPRODUCT?

Can SUMPRODUCT only handle one of these per array?

Thanks much,
Jamison

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default SUMIF and {multiple criteria}

I believe that reason is that it checks for DECONS="Ontime from ETA" and
SPLIT="E"

then

DECONS="Ontime" and SPLIT="W"

In other words the first item in DECONS and the first item in the SPLIT
array then the 2nd item in DECONS and the 2nd item in the SPLIT array. NOT
the first item in the DECONS array with both items in the SPLIT array.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


wrote in message
ups.com...
Can anyone help me to understand why this formula gives the correct
result:
=(SUMPRODUCT((Region="Asia")*(DECONS="Ontime")*(SP LIT={"E","W"}))
+SUMPRODUCT((Region="Asia")*(DECONS="Ontime from
ETA")*(SPLIT={"E","W"})))

But if I try to condense it further to:
=SUMPRODUCT((Region="Asia")*(DECONS={"Ontime from
ETA","Ontime"})*(SPLIT={"E","W"}))

It stops working?

Seems to me that, if it can manage to look for either "E" or "W" in a
single SUMPRODUCT, why can't it also look for "Ontime" or "Ontime from
ETA" in the same SUMPRODUCT?

Can SUMPRODUCT only handle one of these per array?

Thanks much,
Jamison




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF and {multiple criteria}

That makes very good sense, cheers! I strongly believe you are
correct.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default SUMIF and {multiple criteria}

wrote in message
ps.com...
That makes very good sense, cheers! I strongly believe you are
correct


If not there will soemone along in a minute to put us both right <g

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default SUMIF and {multiple criteria}

You could try this

=SUMPRODUCT((Region="Asia")*(SIGN((DECONS="Ontime from
ETA")+(DECONS="Ontime")))*(SIGN((SPLIT="E")+(SPLIT ="W"))))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
ps.com...
That makes very good sense, cheers! I strongly believe you are
correct.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default SUMIF and {multiple criteria}

Bob,

Does it need the SIGN() function calls? It seems to work for me without
them.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Bob Phillips" wrote in message
...
You could try this

=SUMPRODUCT((Region="Asia")*(SIGN((DECONS="Ontime from
ETA")+(DECONS="Ontime")))*(SIGN((SPLIT="E")+(SPLIT ="W"))))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



wrote in message
ps.com...
That makes very good sense, cheers! I strongly believe you are
correct.






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default SUMIF and {multiple criteria}

Since Decons is a single column, it will contain one or the other (or neither).
So the sum will be 1+0 or 0+1 or 0+0. So the =SIGN() function isn't required.

I bet Bob <bg was thinking that by including the =SIGN() function in the
formula, it would be easier for the OP to change the formula to look at two
columns (decons1, decons2, and split1, split2:

=SUMPRODUCT((Region="Asia")*
(SIGN((DECONS1="Ontime from ETA")+(DECONS2="Ontime")))
*(SIGN((SPLIT1="E")+(SPLIT2="W"))))

Then you wouldn't have to worry about both values occuring at the same time:
0+0
1+0
0+1
or
1+1

The =SIGN() function will make sure that the non-zero sum will be treated as 1.

(or Bob could have just screwed up when he tried to make Harlan happy <gdr.)



Sandy Mann wrote:

Bob,

Does it need the SIGN() function calls? It seems to work for me without
them.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk

"Bob Phillips" wrote in message
...
You could try this

=SUMPRODUCT((Region="Asia")*(SIGN((DECONS="Ontime from
ETA")+(DECONS="Ontime")))*(SIGN((SPLIT="E")+(SPLIT ="W"))))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



wrote in message
ps.com...
That makes very good sense, cheers! I strongly believe you are
correct.





--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default SUMIF and {multiple criteria}

On Aug 29, 5:25 pm, "Sandy Mann" wrote:
Bob,

Does it need the SIGN() function calls? It seems to work for me without
them.




Bob,

Yes, it works! I guess you need both SIGN() for both variables to
make it all come together. I don't fully understand why, but it
worked, and that's the crux really. :)

Cheers both,
Jamison

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
sumif multiple criteria Chris Cowles Excel Worksheet Functions 9 May 26th 07 11:06 PM
SUMIF with multiple criteria penri0_0 Excel Discussion (Misc queries) 5 May 18th 06 04:55 PM
sumif for multiple criteria Inter Excel Discussion (Misc queries) 3 May 17th 06 07:17 PM
SUMIF with multiple criteria macquarl Excel Discussion (Misc queries) 4 January 5th 06 02:18 AM
sumif with multiple criteria benb Excel Worksheet Functions 3 January 5th 05 11:07 PM


All times are GMT +1. The time now is 09:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"