A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Sumproduct Ignore Text



 
 
Thread Tools Display Modes
  #1  
Old June 1st 12, 03:53 PM posted to microsoft.public.excel.worksheet.functions
Steve[_122_]
external usenet poster
 
Posts: 2
Default Sumproduct Ignore Text

Hello,
I am using a sumprouct formula to add the contents in G2:G66 where the
first 8 characters of C2:C66 are Subtotal.
=SUMPRODUCT(--(LEFT(C2:C66,8)="Subtotal",--(G2:G66))
My understanding is that bu using the coma rather than * would ignore
text values in G2:G66. However, I am still getting #value be casue of
text values. What is the fix?
Thanks!
Ads
  #2  
Old June 1st 12, 04:00 PM posted to microsoft.public.excel.worksheet.functions
Claus Busch
external usenet poster
 
Posts: 943
Default Sumproduct Ignore Text

Hi Steve,

Am Fri, 1 Jun 2012 07:53:30 -0700 (PDT) schrieb Steve:

> I am using a sumprouct formula to add the contents in G2:G66 where the
> first 8 characters of C2:C66 are Subtotal.
> =SUMPRODUCT(--(LEFT(C2:C66,8)="Subtotal",--(G2:G66))


try:
=SUMPRODUCT(--(LEFT(C2:C66,8)="Subtotal"),(G2:G66))

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3  
Old June 1st 12, 04:28 PM posted to microsoft.public.excel.worksheet.functions
joeu2004[_2_]
external usenet poster
 
Posts: 637
Default Sumproduct Ignore Text

"Steve" > wrote:
> I am using a sumprouct formula to add the contents
> in G2:G66 where the first 8 characters of C2:C66
> are Subtotal.
> =SUMPRODUCT(--(LEFT(C2:C66,8)="Subtotal",--(G2:G66))


You are missing a parenthesis. But that seems to be just a posting typo.
Next time, copy-and-paste from the Formula Bar.

In any case, the formula can be written a little more cleanly, thus:

=SUMPRODUCT(--(LEFT(C2:C66,8)="Subtotal"),G2:G66)

"Steve" > wrote:
> My understanding is that bu using the coma rather
> than * would ignore text values in G2:G66. However,
> I am still getting #value be casue of text values.


Because when you write --(G2:G66), SUMPRODUCT no longer sees G2:G66
directly. Instead, you are telling Excel to perform an arithmetic operation
(double negation) and pass an array of numeric values to SUMPRODUCT.

Only use double negation -- or some other arithmetic operation -- when you
want to convert non-numeric values to numeric values. For
example, --(LEFT(C2:C66,8)="Subtotal") converts an array of TRUE and FALSE
to an array of 1 and 0, which SUMPRODUCT needs to see in order to perform
the "logic" that you intend.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can SUMPRODUCT be made to ignore text Thanks Excel Worksheet Functions 6 September 4th 09 02:50 PM
How to ignore #DIV/0! in Sumproduct formula deeds Excel Worksheet Functions 7 June 29th 07 05:11 PM
SUMPRODUCT - Ignore blank rows sahafi Excel Worksheet Functions 8 June 13th 07 06:11 PM
Sumproduct to ignore text and "" Ricky Pang Excel Worksheet Functions 6 December 10th 05 07:36 AM
SUMPRODUCT excel ignore div/0 [email protected] Excel Programming 1 November 15th 05 01:25 PM


All times are GMT +1. The time now is 02:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2004-2013 ExcelBanter.
The comments are property of their posters.