Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default SUMPRODUCT() yielding #NUM!

Bob Phillips & Glen helped me out with a SUMIF() question I posted earlier
today. Both of you recommended that I use this formula:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

(I changed the name of the range from Date to PayDate so I don't use a
reserved function name.)

Now I am getting a #NUM! errror. I looked in help and it said this happens
when you have non-numeric data. I've gone through the entire columns in
question (PayDate and LWOP) and deleted the values from all cells that should
be blank. I just have numbers, dates and the column headings. I'm sorry to
be a pain here but can you tell me what else I've done wrong?

Thanks again!


--
Ann Scharpf
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default SUMPRODUCT() yielding #NUM!

Ann Scharpf wrote:
Bob Phillips & Glen helped me out with a SUMIF() question I posted earlier
today. Both of you recommended that I use this formula:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

(I changed the name of the range from Date to PayDate so I don't use a
reserved function name.)

Now I am getting a #NUM! errror. I looked in help and it said this happens
when you have non-numeric data. I've gone through the entire columns in
question (PayDate and LWOP) and deleted the values from all cells that should
be blank. I just have numbers, dates and the column headings. I'm sorry to
be a pain here but can you tell me what else I've done wrong?

Thanks again!



Do "PayDate" and "LWOP" include the column headings?
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT() yielding #NUM!

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

What version of Excel are you using? Do the named ranges refer to entire
columns? If so, you can't use entire columns as range references with
SUMPRODUCT unless you're using Excel 2007 or later.

--
Biff
Microsoft Excel MVP


"Ann Scharpf" wrote in message
...
Bob Phillips & Glen helped me out with a SUMIF() question I posted earlier
today. Both of you recommended that I use this formula:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

(I changed the name of the range from Date to PayDate so I don't use a
reserved function name.)

Now I am getting a #NUM! errror. I looked in help and it said this
happens
when you have non-numeric data. I've gone through the entire columns in
question (PayDate and LWOP) and deleted the values from all cells that
should
be blank. I just have numbers, dates and the column headings. I'm sorry
to
be a pain here but can you tell me what else I've done wrong?

Thanks again!


--
Ann Scharpf



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default SUMPRODUCT() yielding #NUM!

"Ann Scharpf" wrote:
=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

[....]
Now I am getting a #NUM! errror. I looked in
help and it said this happens when you have
non-numeric data.


Let's clear up some facts. Are you getting a #NUM or a #VALUE error?

To my knowledge, SUMPRODUCT does not return #NUM. At least, that is the
case for Excel 2003. Moreover, Excel 2003 Help describes #NUM as an invalid
numeric value, not when you have non-numeric data when numeric data is
expected. Compare SQRT(-1) and SQRT("oops"). On the other hand, Excel 2003
does return a #VALUE in that case. Consider --"oops".


I just have numbers, dates and the column headings.


Whereas SUMPRODUCT will tolerate non-numeric data (e.g. column headings) in
LWOP, YEAR does not tolerate non-numeric data. Yet SUMPRODUCT requires that
the size of ranges, PayDate and LWOP, be the same.

Therefore, those ranges cannot include the column headings.

However, again, YEAR(PayDate) would return a #VALUE error, not #NUM, if it
encounteres non-numeric data.

If you are truly getting a #NUM error, either one of the cells referenced by
PayDate or LWOP contains a #NUM error, or your version of Excel (which?)
behaves differently than Excel 2003.

If you cannot get help constructive assistance in this forum -- it is very
difficult to debug worksheets at arm's length -- feel free to send me the
Excel file. Send it to joeu2004 "at" hotmail.com.


----- original message -----

"Ann Scharpf" wrote:

Bob Phillips & Glen helped me out with a SUMIF() question I posted earlier
today. Both of you recommended that I use this formula:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

(I changed the name of the range from Date to PayDate so I don't use a
reserved function name.)

Now I am getting a #NUM! errror. I looked in help and it said this happens
when you have non-numeric data. I've gone through the entire columns in
question (PayDate and LWOP) and deleted the values from all cells that should
be blank. I just have numbers, dates and the column headings. I'm sorry to
be a pain here but can you tell me what else I've done wrong?

Thanks again!


--
Ann Scharpf

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT() yielding #NUM!

To my knowledge, SUMPRODUCT does not return #NUM.
At least, that is the case for Excel 2003


I don't have Excel 2003 but in Excel 2002 this returns #NUM!:

=SUMPRODUCT(--(A:A=""))

--
Biff
Microsoft Excel MVP


"Joe User" <joeu2004 wrote in message
...
"Ann Scharpf" wrote:
=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

[....]
Now I am getting a #NUM! errror. I looked in
help and it said this happens when you have
non-numeric data.


Let's clear up some facts. Are you getting a #NUM or a #VALUE error?

To my knowledge, SUMPRODUCT does not return #NUM. At least, that is the
case for Excel 2003. Moreover, Excel 2003 Help describes #NUM as an
invalid
numeric value, not when you have non-numeric data when numeric data is
expected. Compare SQRT(-1) and SQRT("oops"). On the other hand, Excel
2003
does return a #VALUE in that case. Consider --"oops".


I just have numbers, dates and the column headings.


Whereas SUMPRODUCT will tolerate non-numeric data (e.g. column headings)
in
LWOP, YEAR does not tolerate non-numeric data. Yet SUMPRODUCT requires
that
the size of ranges, PayDate and LWOP, be the same.

Therefore, those ranges cannot include the column headings.

However, again, YEAR(PayDate) would return a #VALUE error, not #NUM, if it
encounteres non-numeric data.

If you are truly getting a #NUM error, either one of the cells referenced
by
PayDate or LWOP contains a #NUM error, or your version of Excel (which?)
behaves differently than Excel 2003.

If you cannot get help constructive assistance in this forum -- it is very
difficult to debug worksheets at arm's length -- feel free to send me the
Excel file. Send it to joeu2004 "at" hotmail.com.


----- original message -----

"Ann Scharpf" wrote:

Bob Phillips & Glen helped me out with a SUMIF() question I posted
earlier
today. Both of you recommended that I use this formula:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

(I changed the name of the range from Date to PayDate so I don't use a
reserved function name.)

Now I am getting a #NUM! errror. I looked in help and it said this
happens
when you have non-numeric data. I've gone through the entire columns in
question (PayDate and LWOP) and deleted the values from all cells that
should
be blank. I just have numbers, dates and the column headings. I'm sorry
to
be a pain here but can you tell me what else I've done wrong?

Thanks again!


--
Ann Scharpf





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default SUMPRODUCT() yielding #NUM!

"T. Valko" wrote:
To my knowledge, SUMPRODUCT does not return #NUM.
At least, that is the case for Excel 2003


I don't have Excel 2003 but in Excel 2002 this returns #NUM!:
=SUMPRODUCT(--(A:A=""))


That example returns #NUM in Excel 2003 as well. It is not documented in
the offline Help page. The problem is that indefinite ranges like A:A are
not permitted with SUMPRODUCT (before Excel 2007?). It must be of the form
A1:A1000.

So returning to Ann's problem, the #NUM error might result if the name
ranges PayDate and LWOP are of the form A:A instead of A1:A1000.

Nevertheless, the PayDate cannot include column headings, if by that Ann
means text. If it does, the YEAR(PayDate) expression will return a #VALUE
error.


----- original message -----

"T. Valko" wrote in message
...
To my knowledge, SUMPRODUCT does not return #NUM.
At least, that is the case for Excel 2003


I don't have Excel 2003 but in Excel 2002 this returns #NUM!:

=SUMPRODUCT(--(A:A=""))

--
Biff
Microsoft Excel MVP


"Joe User" <joeu2004 wrote in message
...
"Ann Scharpf" wrote:
=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

[....]
Now I am getting a #NUM! errror. I looked in
help and it said this happens when you have
non-numeric data.


Let's clear up some facts. Are you getting a #NUM or a #VALUE error?

To my knowledge, SUMPRODUCT does not return #NUM. At least, that is the
case for Excel 2003. Moreover, Excel 2003 Help describes #NUM as an
invalid
numeric value, not when you have non-numeric data when numeric data is
expected. Compare SQRT(-1) and SQRT("oops"). On the other hand, Excel
2003
does return a #VALUE in that case. Consider --"oops".


I just have numbers, dates and the column headings.


Whereas SUMPRODUCT will tolerate non-numeric data (e.g. column headings)
in
LWOP, YEAR does not tolerate non-numeric data. Yet SUMPRODUCT requires
that
the size of ranges, PayDate and LWOP, be the same.

Therefore, those ranges cannot include the column headings.

However, again, YEAR(PayDate) would return a #VALUE error, not #NUM, if
it
encounteres non-numeric data.

If you are truly getting a #NUM error, either one of the cells referenced
by
PayDate or LWOP contains a #NUM error, or your version of Excel (which?)
behaves differently than Excel 2003.

If you cannot get help constructive assistance in this forum -- it is
very
difficult to debug worksheets at arm's length -- feel free to send me the
Excel file. Send it to joeu2004 "at" hotmail.com.


----- original message -----

"Ann Scharpf" wrote:

Bob Phillips & Glen helped me out with a SUMIF() question I posted
earlier
today. Both of you recommended that I use this formula:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

(I changed the name of the range from Date to PayDate so I don't use a
reserved function name.)

Now I am getting a #NUM! errror. I looked in help and it said this
happens
when you have non-numeric data. I've gone through the entire columns in
question (PayDate and LWOP) and deleted the values from all cells that
should
be blank. I just have numbers, dates and the column headings. I'm
sorry to
be a pain here but can you tell me what else I've done wrong?

Thanks again!


--
Ann Scharpf




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default SUMPRODUCT() yielding #NUM!

THANKS! My problem was that I'd selected the whole column when I named the
range. It's been about 4 years since I wrote a formula using SUMPRODUCT()
and i totally forgot about that limitations of not naming whole columns and
the ranges needing to include the same number of rows.

Recreating the named ranges fixed the problem.

Oh, and it WAS a #NUM! ERROR.
--
Ann Scharpf


"T. Valko" wrote:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)


What version of Excel are you using? Do the named ranges refer to entire
columns? If so, you can't use entire columns as range references with
SUMPRODUCT unless you're using Excel 2007 or later.

--
Biff
Microsoft Excel MVP


"Ann Scharpf" wrote in message
...
Bob Phillips & Glen helped me out with a SUMIF() question I posted earlier
today. Both of you recommended that I use this formula:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

(I changed the name of the range from Date to PayDate so I don't use a
reserved function name.)

Now I am getting a #NUM! errror. I looked in help and it said this
happens
when you have non-numeric data. I've gone through the entire columns in
question (PayDate and LWOP) and deleted the values from all cells that
should
be blank. I just have numbers, dates and the column headings. I'm sorry
to
be a pain here but can you tell me what else I've done wrong?

Thanks again!


--
Ann Scharpf



.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT() yielding #NUM!

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Ann Scharpf" wrote in message
...
THANKS! My problem was that I'd selected the whole column when I named
the
range. It's been about 4 years since I wrote a formula using SUMPRODUCT()
and i totally forgot about that limitations of not naming whole columns
and
the ranges needing to include the same number of rows.

Recreating the named ranges fixed the problem.

Oh, and it WAS a #NUM! ERROR.
--
Ann Scharpf


"T. Valko" wrote:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)


What version of Excel are you using? Do the named ranges refer to entire
columns? If so, you can't use entire columns as range references with
SUMPRODUCT unless you're using Excel 2007 or later.

--
Biff
Microsoft Excel MVP


"Ann Scharpf" wrote in message
...
Bob Phillips & Glen helped me out with a SUMIF() question I posted
earlier
today. Both of you recommended that I use this formula:

=SUMPRODUCT(--(YEAR(PayDate)=YEAR(TODAY())),LWOP)

(I changed the name of the range from Date to PayDate so I don't use a
reserved function name.)

Now I am getting a #NUM! errror. I looked in help and it said this
happens
when you have non-numeric data. I've gone through the entire columns
in
question (PayDate and LWOP) and deleted the values from all cells that
should
be blank. I just have numbers, dates and the column headings. I'm
sorry
to
be a pain here but can you tell me what else I've done wrong?

Thanks again!


--
Ann Scharpf



.



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Complete review

I had the same problem.
SUMPRODUCT works fine in excel 2007.
But in excel 2003 it returned: #NUM!

=SUMPRODUCT(--($A:$A=E$2);--($C:$C=$E4);--($D:$D))
same for:
{=SUM(IF(($A:$A=E$2)*($C:$C=$E4);$D:$D))}
And obviously,
=SUMIFS(...)
doesn't work at all in pre-2007.

With the previous info in this thread it became clear you can not use entire columns!

Obvious solution:
=SUMPRODUCT(($A1:$A64000=E$2)*($C1:$C64000=$E4)*($ D1:$D64000))
But that returned: #VALUE!

One final review on the sum-range...
ALL cells in that range need to have a number!
I filled up the empty cells with "0" and the formula finally gave me the result "6".
This is the correct result for me :-)

NOTE:
As previously mentioned, you can also use the {=SUM(IF(...)} formula. Which is not troubled by empty cells. Just don't use entire columns in a range ;-)



e.g. type in cell:
=SUM(IF((A1:A64000=E1)*(C1:C64000=F1);D1:D64000))
(use <ctrl+<shift+<enter to properly save formula)



T. Valko wrote:

I do not have Excel 2003 but in Excel 2002 this returns #NUM!
26-Feb-10

I do not have Excel 2003 but in Excel 2002 this returns #NUM!:

=SUMPRODUCT(--(A:A=""))

--
Biff
Microsoft Excel MVP


"Joe User" <joeu2004 wrote in message

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Creating a WPF Custom Control
http://www.eggheadcafe.com/tutorials...ustom-con.aspx
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Complete review

=SUMPRODUCT(($A1:$A64000=E$2)*($C1:$C64000=$E4)*( $D1:$D64000))
One final review on the sum-range...
ALL cells in that range need to have a number!


Not if you use this syntax:

=SUMPRODUCT(--($A1:$A64000=E$2),--($C1:$C64000=$E4),$D1:$D64000)

http://xldynamic.com/source/xld.SUMPRODUCT.html

--
Biff
Microsoft Excel MVP


<Emiel Wielinga wrote in message
...
I had the same problem.
SUMPRODUCT works fine in excel 2007.
But in excel 2003 it returned: #NUM!

=SUMPRODUCT(--($A:$A=E$2);--($C:$C=$E4);--($D:$D))
same for:
{=SUM(IF(($A:$A=E$2)*($C:$C=$E4);$D:$D))}
And obviously,
=SUMIFS(...)
doesn't work at all in pre-2007.

With the previous info in this thread it became clear you can not use
entire columns!

Obvious solution:
=SUMPRODUCT(($A1:$A64000=E$2)*($C1:$C64000=$E4)*($ D1:$D64000))
But that returned: #VALUE!

One final review on the sum-range...
ALL cells in that range need to have a number!
I filled up the empty cells with "0" and the formula finally gave me the
result "6".
This is the correct result for me :-)

NOTE:
As previously mentioned, you can also use the {=SUM(IF(...)} formula.
Which is not troubled by empty cells. Just don't use entire columns in a
range ;-)



e.g. type in cell:
=SUM(IF((A1:A64000=E1)*(C1:C64000=F1);D1:D64000))
(use <ctrl+<shift+<enter to properly save formula)



T. Valko wrote:

I do not have Excel 2003 but in Excel 2002 this returns #NUM!
26-Feb-10

I do not have Excel 2003 but in Excel 2002 this returns #NUM!:

=SUMPRODUCT(--(A:A=""))

--
Biff
Microsoft Excel MVP


"Joe User" <joeu2004 wrote in message

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Creating a WPF Custom Control
http://www.eggheadcafe.com/tutorials...ustom-con.aspx



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 with Condition OR Sumproduct with ADDRESS function - HE gholly Excel Discussion (Misc queries) 2 September 28th 09 05:07 PM
V Look up not yielding all results needed smiley61799 New Users to Excel 2 June 22nd 09 09:29 PM
Conditional SUMPRODUCT or SUMPRODUCT with Filters Ted M H Excel Worksheet Functions 4 August 14th 08 07:50 PM
Add column A column B yielding column C Stat Seeker Excel Worksheet Functions 1 May 28th 07 04:48 PM
LOOKUP function yielding a #N/A result MsBeverlee Excel Worksheet Functions 6 March 11th 07 10:53 PM


All times are GMT +1. The time now is 06:59 AM.

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"