PC Review


Reply
Thread Tools Rate Thread

add two criteria that should not be met to sumproduct

 
 
Diddy
Guest
Posts: n/a
 
      3rd Mar 2009
Hi everyone,

I posted this a little while ago and Pete UK answered but I got moved on to
another piece of work and I think my post had fallen off the screen by the
time I answered to say that Pete's suggestion hadn't worked- sorry about that
Pete UK. I'm now back to this piece of work and if anyone can help that would
be great!

I'm using the following
=SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1),--(Data!$K$2:$K$10000<>"N2"))

Which works beautifully but I also need to say that if k2:k10000 does not
equal N1 it shouldn't be counted as well.

Pete UK suggested

=SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1) ,--
(Data!$K$2:$K$10000<>"N2"),--(Data!$K$Â*2:$K$10000<>"N1"))

I got some strange results back with this one, so if Pete UK or anyone out
there can help I'd be so happy :-)

Grateful for any help

--
Diddy
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      3rd Mar 2009
Hi,

What are the strange results you got? The formula you got from Pete UK looks
fine to me provided you are checking for the string "N1" in column K if you
want to refer to the range N1 then drop the quotes

=SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1),--(Data!$K$2:$K$10000<>N2),--(Data!$K$2:$K$10000<>N1))

Mike

"Diddy" wrote:

> Hi everyone,
>
> I posted this a little while ago and Pete UK answered but I got moved on to
> another piece of work and I think my post had fallen off the screen by the
> time I answered to say that Pete's suggestion hadn't worked- sorry about that
> Pete UK. I'm now back to this piece of work and if anyone can help that would
> be great!
>
> I'm using the following
> =SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1),--(Data!$K$2:$K$10000<>"N2"))
>
> Which works beautifully but I also need to say that if k2:k10000 does not
> equal N1 it shouldn't be counted as well.
>
> Pete UK suggested
>
> =SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1) ,--
> (Data!$K$2:$K$10000<>"N2"),--(Data!$K$Â*2:$K$10000<>"N1"))
>
> I got some strange results back with this one, so if Pete UK or anyone out
> there can help I'd be so happy :-)
>
> Grateful for any help
>
> --
> Diddy

 
Reply With Quote
 
Diddy
Guest
Posts: n/a
 
      3rd Mar 2009
Sorry Mike,

It does all it's supposed to do. Must have left brain at home - Again!

THANK YOU and Pete UK :-)
--
Diddy


"Mike H" wrote:

> Hi,
>
> What are the strange results you got? The formula you got from Pete UK looks
> fine to me provided you are checking for the string "N1" in column K if you
> want to refer to the range N1 then drop the quotes
>
> =SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1),--(Data!$K$2:$K$10000<>N2),--(Data!$K$2:$K$10000<>N1))
>
> Mike
>
> "Diddy" wrote:
>
> > Hi everyone,
> >
> > I posted this a little while ago and Pete UK answered but I got moved on to
> > another piece of work and I think my post had fallen off the screen by the
> > time I answered to say that Pete's suggestion hadn't worked- sorry about that
> > Pete UK. I'm now back to this piece of work and if anyone can help that would
> > be great!
> >
> > I'm using the following
> > =SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1),--(Data!$K$2:$K$10000<>"N2"))
> >
> > Which works beautifully but I also need to say that if k2:k10000 does not
> > equal N1 it shouldn't be counted as well.
> >
> > Pete UK suggested
> >
> > =SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1) ,--
> > (Data!$K$2:$K$10000<>"N2"),--(Data!$K$Â*2:$K$10000<>"N1"))
> >
> > I got some strange results back with this one, so if Pete UK or anyone out
> > there can help I'd be so happy :-)
> >
> > Grateful for any help
> >
> > --
> > Diddy

 
Reply With Quote
 
Diddy
Guest
Posts: n/a
 
      3rd Mar 2009
I'll go back anf tick answered on original post as well
--
Diddy


"Mike H" wrote:

> Hi,
>
> What are the strange results you got? The formula you got from Pete UK looks
> fine to me provided you are checking for the string "N1" in column K if you
> want to refer to the range N1 then drop the quotes
>
> =SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1),--(Data!$K$2:$K$10000<>N2),--(Data!$K$2:$K$10000<>N1))
>
> Mike
>
> "Diddy" wrote:
>
> > Hi everyone,
> >
> > I posted this a little while ago and Pete UK answered but I got moved on to
> > another piece of work and I think my post had fallen off the screen by the
> > time I answered to say that Pete's suggestion hadn't worked- sorry about that
> > Pete UK. I'm now back to this piece of work and if anyone can help that would
> > be great!
> >
> > I'm using the following
> > =SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1),--(Data!$K$2:$K$10000<>"N2"))
> >
> > Which works beautifully but I also need to say that if k2:k10000 does not
> > equal N1 it shouldn't be counted as well.
> >
> > Pete UK suggested
> >
> > =SUMPRODUCT(--(Data!$C$2:$C$10000=$A6),--(Data!$S$2:$S$10000=1) ,--
> > (Data!$K$2:$K$10000<>"N2"),--(Data!$K$Â*2:$K$10000<>"N1"))
> >
> > I got some strange results back with this one, so if Pete UK or anyone out
> > there can help I'd be so happy :-)
> >
> > Grateful for any help
> >
> > --
> > Diddy

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT, MAX, Few Criteria Chris26 Microsoft Excel Worksheet Functions 3 4th Aug 2009 03:53 PM
SUMPRODUCT with 3 criteria Kit Microsoft Excel Misc 7 13th Jul 2009 01:54 PM
add two criteria that should not be met to sumproduct Diddy Microsoft Excel Worksheet Functions 4 3rd Mar 2009 12:48 PM
SUMPRODUCT w/ 3 criteria =?Utf-8?B?amFuZQ==?= Microsoft Excel Worksheet Functions 3 9th Nov 2007 11:26 PM
SUMPRODUCT using more than 2 criteria? =?Utf-8?B?VGFzaGE=?= Microsoft Excel Worksheet Functions 2 17th Aug 2007 02:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:39 AM.