Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default SUMPRODUCT not working?

Hi
I need to sum a cell range (F2:F90) based on two conditions of two other
cell ranges (D2:D90="XXX" and I2:I90=""), where the parameter of the first
condition may change ("XXX" changes to "MFB", "TGDolfa", "GATV", etc.) and
the second remains constant (I2:I90="").
On one cell I tried the formula:
=SUMPRODUCT((D2:D90="MFB")*(I2:I90="")*(F2:F90))
and it worked as I got an accurate result.
Now the part that is driving me crazy...
When I copied the formula to the cell below and changed the first
condition's parameter to another valid value...
=SUMPRODUCT((D2:D90="TGDolfa")*(I2:I90="")*(F2:F90 ))
I get a result of ZERO when I can see data that should be added!
I tried changing the formula to
=SUMPRODUCT(--(D2:D90="TGDolfa"),--(I2:I90=""),(F2:F90))
without success.
I even tried to change the first condition's parameter in the first cell
(the one that works) and I get a result of zero!
The same happens when I change the * for the -- in the SUMPRODUCT syntax.
=SUMPRODUCT(--(D2:D90="MFB"),--(I2:I90=""),(F2:F90))
(thanks to the undo button I still keep that one working).

I know that SUMPRODUCT is the function I need but I have been able to make
it work in one cell only!
I tried to look for errors in the data but I know it is OK (no spurious
spaces, etc). If I try the formula for a single row
=SUMPRODUCT((D11="Boroondara")*(I11=""),F11) it works, but as soon as I
implement the cell range
=SUMPRODUCT((D2:D90="Boroondara")*(I2:I90="")*F2:F 90)
The result turns to zero.

Does someone know what I'm doing wrong?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default SUMPRODUCT not working?

Your formula should work
=SUMPRODUCT((D2:D90="TGDolfa")*(I2:I90="")*F2:F90)

Did you check whether I2:I90 range is actually blank "" . Try the below
version

=SUMPRODUCT((D2:D90="TGDolfa")*(TRIM(I2:I90)="")*F 2:F90)

If this post helps click Yes
---------------
Jacob Skaria


"Gusso007" wrote:

Hi
I need to sum a cell range (F2:F90) based on two conditions of two other
cell ranges (D2:D90="XXX" and I2:I90=""), where the parameter of the first
condition may change ("XXX" changes to "MFB", "TGDolfa", "GATV", etc.) and
the second remains constant (I2:I90="").
On one cell I tried the formula:
=SUMPRODUCT((D2:D90="MFB")*(I2:I90="")*(F2:F90))
and it worked as I got an accurate result.
Now the part that is driving me crazy...
When I copied the formula to the cell below and changed the first
condition's parameter to another valid value...
=SUMPRODUCT((D2:D90="TGDolfa")*(I2:I90="")*(F2:F90 ))
I get a result of ZERO when I can see data that should be added!
I tried changing the formula to
=SUMPRODUCT(--(D2:D90="TGDolfa"),--(I2:I90=""),(F2:F90))
without success.
I even tried to change the first condition's parameter in the first cell
(the one that works) and I get a result of zero!
The same happens when I change the * for the -- in the SUMPRODUCT syntax.
=SUMPRODUCT(--(D2:D90="MFB"),--(I2:I90=""),(F2:F90))
(thanks to the undo button I still keep that one working).

I know that SUMPRODUCT is the function I need but I have been able to make
it work in one cell only!
I tried to look for errors in the data but I know it is OK (no spurious
spaces, etc). If I try the formula for a single row
=SUMPRODUCT((D11="Boroondara")*(I11=""),F11) it works, but as soon as I
implement the cell range
=SUMPRODUCT((D2:D90="Boroondara")*(I2:I90="")*F2:F 90)
The result turns to zero.

Does someone know what I'm doing wrong?

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
Sumproduct not working Curtis Excel Worksheet Functions 3 November 6th 09 04:20 AM
Sumproduct not working Curtis Excel Worksheet Functions 3 November 4th 09 02:16 AM
SUMPRODUCT not working. Gaurav[_4_] Excel Worksheet Functions 2 June 25th 09 09:37 PM
SUMPRODUCT not working Ang Excel Worksheet Functions 7 April 28th 07 07:32 AM
SUMPRODUCT not working tankerman Excel Discussion (Misc queries) 4 January 31st 07 08:07 PM


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