take the green pill or take the SUMPRODUCT?

  • Thread starter Thread starter sexynumbers
  • Start date Start date
S

sexynumbers

I have this function, bestowed upon me from beyond excel purgatory...


=SUMPRODUCT(--(Sheet2!$G$2:$G$65536=$E$7),--(Sheet2!$L$2:$L
$65536>=1),--(Sheet2!$L$2:$L$65536<=3999),Sheet2!$M$2:$M$65536)

Column L is full of numbers from 0 to 9999, the second expression in
the formula needs to call up all numbers in Column L from 1 to 3999.

What if? What if... I still need 1 to 3999, but need to exclude two
numbers, 2000 and 2010 from the set?

Please, please...please....thanks for any assistance given...!
 
=SUMPRODUCT(--(Sheet2!$G$2:$G$65535=$E$7),--(Sheet2!$L$2:$L$65535>=1),--(Sheet2!$L$2:$L$65535<=3999),
--(Sheet2!$L$2:$L$65535<>2000),--(Sheet2!$L$2:$L$65535<>2010),Sheet2!$M$2:$M$65535)

but a dynamic range might work better her rather than huge ranges

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
=SUMPRODUCT(--(Sheet2!$G$2:$G$65535=$E$7),--(Sheet2!$L$2:$L$65535>=1),--(Sh­eet2!$L$2:$L$65535<=3999),
--(Sheet2!$L$2:$L$65535<>2000),--(Sheet2!$L$2:$L$65535<>2010),Sheet2!$M$2:$­M$65535)

but a dynamic range might work better her rather than huge ranges

--
---
HTH

Bob

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








- Show quoted text -

Many Thanks Bob, will look into the dynamic range for the future!
 
another way

=SUMPRODUCT(--(Sheet2!$G$2:$G$65536=$E$7),--(Sheet2!$L$2:$L
$65536>=1),--(Sheet2!$L$2:$L$65536<=3999),Sheet2!$M$2:$M$65536)-
SUMPRODUCT(--(Sheet2!$G$2:$G$65536=$E$7),--or(Sheet2!$L$2:$L
$65536=2000,Sheet2!$L$2:$L$65536=2010),Sheet2!$M$2:$M$65536)
 

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

Back
Top