Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

Sumproduct with text and numbers in cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lee - 18 Apr 2008 18:06 GMT
Excel 2007

I want to sum a column that each cell has a number or text in it based on
the conditions of that cell having a number and the results of other arrays.
I keep getting #value error even though I use the double unary (--). Can I
do this using sumproduct or do I need to use the sumifs? I was hoping to use
the sumproduct to keep the workbook compatible with 2003 user.
Thanks,
Signature

Lee Coleman

Barb Reinhardt - 18 Apr 2008 19:43 GMT
What exactly are you trying?  

=SUMPRODUCT(--(A1:A10="Text"),--(B1:B10=1),(C1:C10))

Sums values in column C where A = "Text" and b (the value) = 1.

Is this what you're doing?
Signature

HTH,
Barb Reinhardt

> Excel 2007
>
[quoted text clipped - 4 lines]
> the sumproduct to keep the workbook compatible with 2003 user.
> Thanks,
Lee - 18 Apr 2008 22:50 GMT
I have tried something like this:
=sumproduct(--(weeknum(A1:A10,1)=othersheetA1),--(C1:10>0),C1:C10)
I want to sum column C based on the date column A equal to the week number
in A1 on another sheet. The problem is the C column has numbers or text, not
both, and I want to sum the numbers in the C column that are greater than 0.
I get the #value error based on the above formula.
Thanks,
Lee

> What exactly are you trying?
>
[quoted text clipped - 15 lines]
>> the sumproduct to keep the workbook compatible with 2003 user.
>> Thanks,
Barb Reinhardt - 18 Apr 2008 23:44 GMT
=sumproduct(--(weeknum(A1:A10,1)=othersheet!A1),--(C1:C10>0),(C1:C10))

Signature

HTH,
Barb Reinhardt

> I have tried something like this:
> =sumproduct(--(weeknum(A1:A10,1)=othersheetA1),--(C1:10>0),C1:C10)
[quoted text clipped - 24 lines]
> >> the sumproduct to keep the workbook compatible with 2003 user.
> >> Thanks,
Lee - 19 Apr 2008 04:46 GMT
=SUMPRODUCT(--(WEEKNUM(Spring4!$N$2:$N$2000,1)='Weekly Plug
Tray'!$A4),--(Spring4!$P$2:$P$2000>0),(Spring4!$P$2:$P$2000))

The above formula is what I have and doesn't work. However, if I use the
formula below with a helper column it works:

=SUMPRODUCT(--(Spring4!$U$2:$U$2000='Weekly Plug
Tray'!$A5),--(Spring4!$P$2:$P$2000>0),(Spring4!$P$2:$P$2000))

My problem may be with the weeknum function rather than with the sumproduct.
any thoughts?
Thanks again.
Lee

> =sumproduct(--(weeknum(A1:A10,1)=othersheet!A1),--(C1:C10>0),(C1:C10))
>
[quoted text clipped - 32 lines]
>> >> the sumproduct to keep the workbook compatible with 2003 user.
>> >> Thanks,
daddylonglegs - 20 Apr 2008 00:48 GMT
A helper column would be the easiest way to go, I think, but if you really
wanted to avoid that......

You can replicate =WEEKNUM(A1,1) with

=INT((A1-DATE(YEAR(A1),1,1)-WEEKDAY(A1))/7)+2

so you could change your formula to:

=SUMPRODUCT(--(INT((Spring4!$N$2:$N$2000-DATE(YEAR(Spring4!$N$2:$N$2000),1,1)-WEEKDAY(Spring4!$N$2:$N$2000))/7)+2='Weekly
Plug Tray'!$A4),--(Spring4!$P$2:$P$2000>0),(Spring4!$P$2:$P$2000))

> =SUMPRODUCT(--(WEEKNUM(Spring4!$N$2:$N$2000,1)='Weekly Plug
> Tray'!$A4),--(Spring4!$P$2:$P$2000>0),(Spring4!$P$2:$P$2000))
[quoted text clipped - 46 lines]
> >> >> the sumproduct to keep the workbook compatible with 2003 user.
> >> >> Thanks,
T. Valko - 19 Apr 2008 04:50 GMT
The WEEKNUM function won't work on arrays.

Signature

Biff
Microsoft Excel MVP

> =sumproduct(--(weeknum(A1:A10,1)=othersheet!A1),--(C1:C10>0),(C1:C10))
>
[quoted text clipped - 32 lines]
>> >> the sumproduct to keep the workbook compatible with 2003 user.
>> >> Thanks,
Neophyte - 19 Apr 2008 14:19 GMT
Thanks for telling me. It will work with the helper column. How do you know
what will and won't work?
Lee
> The WEEKNUM function won't work on arrays.
>
[quoted text clipped - 34 lines]
>>> >> the sumproduct to keep the workbook compatible with 2003 user.
>>> >> Thanks,
T. Valko - 19 Apr 2008 19:29 GMT
>How do you know what will and won't work?

Experience combined with trial and error. I don't think I've ever read in
the Excel help files that such and such function(s) do not work with arrays.
So, it's trial and error.

Signature

Biff
Microsoft Excel MVP

> Thanks for telling me. It will work with the helper column. How do you
> know what will and won't work?
[quoted text clipped - 37 lines]
>>>> >> the sumproduct to keep the workbook compatible with 2003 user.
>>>> >> Thanks,
Barb Reinhardt - 20 Apr 2008 15:29 GMT
Thanks, I've learned something today.  :)

Barb Reinhardt

> >How do you know what will and won't work?
>
[quoted text clipped - 43 lines]
> >>>> >> the sumproduct to keep the workbook compatible with 2003 user.
> >>>> >> Thanks,
Lee - 21 Apr 2008 16:18 GMT
Thanks to all for helping. I don't feel quite so ignorant knowing that all
functions do not get along. (Sounds like some programers built a little of
their persona into them.) Again, many thanks to all.

Lee

> >How do you know what will and won't work?
>
> Experience combined with trial and error. I don't think I've ever read in
> the Excel help files that such and such function(s) do not work with
> arrays. So, it's trial and error.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.