Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kevin H. Stecyk
 
Posts: n/a
Default XL 2003 & Sumproduct Question

Hi,

As a subset of my problem, I am trying to figure out what is wrong my
sumproduct formula. I am sure that it is something simple.

I have the following cells:
A1=8; B1=16
A2:B3 = 0

In cell A5, I want the sum of Col A when Col A is less than Col B.

I have...

=sumproduct(a1:a3<b1:b3, a1:a3)

When I use this equation, I get 0. I was expecting 8.

When I select and evaluate A1:A3<B1:B3, I get {true; false; false}. When I
select and evaluate a1:a3, I get {8;0;0}

What am I doing wrong that I am not getting 8 for my answer?

Thank you.

Kevin


  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default XL 2003 & Sumproduct Question

Kevin,

try

=SUMPRODUCT(--(A1:A3<B1:B3), A1:A3)

or

=SUMPRODUCT((A1:A3<B1:B3)*(A1:A3))


Regards,

Peo Sjoblom

"Kevin H. Stecyk" wrote:

Hi,

As a subset of my problem, I am trying to figure out what is wrong my
sumproduct formula. I am sure that it is something simple.

I have the following cells:
A1=8; B1=16
A2:B3 = 0

In cell A5, I want the sum of Col A when Col A is less than Col B.

I have...

=sumproduct(a1:a3<b1:b3, a1:a3)

When I use this equation, I get 0. I was expecting 8.

When I select and evaluate A1:A3<B1:B3, I get {true; false; false}. When I
select and evaluate a1:a3, I get {8;0;0}

What am I doing wrong that I am not getting 8 for my answer?

Thank you.

Kevin



  #3   Report Post  
Posted to microsoft.public.excel.misc
Kevin H. Stecyk
 
Posts: n/a
Default XL 2003 & Sumproduct Question

Peo Sjoblom wrote....
Kevin,

try

=SUMPRODUCT(--(A1:A3<B1:B3), A1:A3)

or

=SUMPRODUCT((A1:A3<B1:B3)*(A1:A3))




Yes, both work. Thank you.

If it isn't too much trouble, can you please remind me why the double
negative in the sum product is necessary? Or point me to where this is
explained.

Again, thank you very much!

Best regards,
Kevin


  #4   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default XL 2003 & Sumproduct Question

http://www.mcgimpsey.com/excel/formulae/doubleneg.html

another thing is that if by some strange coincidence should have a text
value in the column that is summed you won't get a value error like you would
if you multiply the arrays with each other


Peo


"Kevin H. Stecyk" wrote:

Peo Sjoblom wrote....
Kevin,

try

=SUMPRODUCT(--(A1:A3<B1:B3), A1:A3)

or

=SUMPRODUCT((A1:A3<B1:B3)*(A1:A3))




Yes, both work. Thank you.

If it isn't too much trouble, can you please remind me why the double
negative in the sum product is necessary? Or point me to where this is
explained.

Again, thank you very much!

Best regards,
Kevin



  #5   Report Post  
Posted to microsoft.public.excel.misc
Kevin H. Stecyk
 
Posts: n/a
Default XL 2003 & Sumproduct Question

Peo Sjoblom wrote...
http://www.mcgimpsey.com/excel/formulae/doubleneg.html

another thing is that if by some strange coincidence should have a text
value in the column that is summed you won't get a value error like you
would
if you multiply the arrays with each other



Thank you very much!!

Best regards,
Kevin


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
Creating a form with 2003 Question Irishimp23 Excel Discussion (Misc queries) 0 March 14th 06 04:26 PM
Sumproduct Question [email protected] Excel Discussion (Misc queries) 9 March 10th 06 04:26 PM
another sumproduct question cjjoo Excel Worksheet Functions 9 November 18th 05 07:59 PM
Sumproduct question Daniel Bonallack Excel Worksheet Functions 3 September 16th 05 07:13 AM
update row numbers after different active cells in macros followi. LMIV Excel Discussion (Misc queries) 11 February 16th 05 12:44 AM


All times are GMT +1. The time now is 07:47 PM.

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"