A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to make SUMPRODUCT work over range that includes text?



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2009, 05:55 PM posted to microsoft.public.excel.worksheet.functions
CuriousGeorge408
external usenet poster
 
Posts: 4
Default How to make SUMPRODUCT work over range that includes text?

I have a column of text labels, with subtotals denoted by "TOTAL", and a
corresponding column of amounts. However, the latter includes some B-cells
with text, but none where the corresponding A-cell is "TOTAL".

I would like to write:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*B1:B54)

to sum the subtotals. But the text in some B-cells causes a #VALUE error.
I tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*N(B1:B54))

to no avail; the result is zero. I also tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B 54),B1:B54))

That, too, results in zero. So far, the only thing that works is the array
formula:

=SUM(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B54),B1: B54))

But I was hoping to avoid an array formula by using SUMPRODUCT.

Is there a non-array formula solution?

  #2  
Old April 19th, 2009, 06:08 PM posted to microsoft.public.excel.worksheet.functions
Francis[_3_]
external usenet poster
 
Posts: 69
Default How to make SUMPRODUCT work over range that includes text?

Hi try this

=SUMPRODUCT(--(A1:A54="TOTAL"),--(B1:B54"*"),B1:B54)
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis

Am not a greek but an ordinary user trying to assist another



"CuriousGeorge408" wrote:

I have a column of text labels, with subtotals denoted by "TOTAL", and a
corresponding column of amounts. However, the latter includes some B-cells
with text, but none where the corresponding A-cell is "TOTAL".

I would like to write:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*B1:B54)

to sum the subtotals. But the text in some B-cells causes a #VALUE error.
I tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*N(B1:B54))

to no avail; the result is zero. I also tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B 54),B1:B54))

That, too, results in zero. So far, the only thing that works is the array
formula:

=SUM(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B54),B1: B54))

But I was hoping to avoid an array formula by using SUMPRODUCT.

Is there a non-array formula solution?


  #3  
Old April 19th, 2009, 06:18 PM posted to microsoft.public.excel.worksheet.functions
Francis[_3_]
external usenet poster
 
Posts: 69
Default How to make SUMPRODUCT work over range that includes text?

Hi I have misread your post

here is a shorter version

=SUMPRODUCT(--(A1:A54="TOTAL"),B1:B54) or
you can use a cell reference for "Total", assume you type Total in cell A55

the formula will change to
=SUMPRODUCT(--(A1:A54=A55),B1:B54)
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis

Am not a greek but an ordinary user trying to assist another



"CuriousGeorge408" wrote:

I have a column of text labels, with subtotals denoted by "TOTAL", and a
corresponding column of amounts. However, the latter includes some B-cells
with text, but none where the corresponding A-cell is "TOTAL".

I would like to write:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*B1:B54)

to sum the subtotals. But the text in some B-cells causes a #VALUE error.
I tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*N(B1:B54))

to no avail; the result is zero. I also tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B 54),B1:B54))

That, too, results in zero. So far, the only thing that works is the array
formula:

=SUM(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B54),B1: B54))

But I was hoping to avoid an array formula by using SUMPRODUCT.

Is there a non-array formula solution?


  #4  
Old April 19th, 2009, 06:20 PM posted to microsoft.public.excel.worksheet.functions
Domenic[_2_]
external usenet poster
 
Posts: 265
Default How to make SUMPRODUCT work over range that includes text?

In article ,
"CuriousGeorge408" wrote:

I have a column of text labels, with subtotals denoted by "TOTAL", and a
corresponding column of amounts. However, the latter includes some B-cells
with text, but none where the corresponding A-cell is "TOTAL".

I would like to write:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*B1:B54)

to sum the subtotals. But the text in some B-cells causes a #VALUE error.
I tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*N(B1:B54))

to no avail; the result is zero. I also tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B 54),B1:B54))

That, too, results in zero. So far, the only thing that works is the array
formula:

=SUM(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B54),B1: B54))

But I was hoping to avoid an array formula by using SUMPRODUCT.

Is there a non-array formula solution?


Try...

=SUMPRODUCT(--(EXACT(A1:A54,"TOTAL")),B1:B54)

However, if case-sensitivity is not an issue, the following should
suffice...

=SUMIF(A1:A54,"Total",B1:B54)

--
Domenic
http://www.xl-central.com
  #5  
Old April 19th, 2009, 10:39 PM posted to microsoft.public.excel.worksheet.functions
joeu2004
external usenet poster
 
Posts: 1,748
Default How to make SUMPRODUCT work over range that includes text?

"Domenic" wrote:
Try...
=SUMPRODUCT(--(EXACT(A1:A54,"TOTAL")),B1:B54)


Well, that was obvious. (No need for the redundant parentheses around the
EXACT function, though.) I thought I had tried that, but apparently not.
Klunk!

Thanks.


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

"Domenic" wrote in message
...
In article ,
"CuriousGeorge408" wrote:

I have a column of text labels, with subtotals denoted by "TOTAL", and a
corresponding column of amounts. However, the latter includes some
B-cells
with text, but none where the corresponding A-cell is "TOTAL".

I would like to write:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*B1:B54)

to sum the subtotals. But the text in some B-cells causes a #VALUE
error.
I tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*N(B1:B54))

to no avail; the result is zero. I also tried:

=SUMPRODUCT(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B 54),B1:B54))

That, too, results in zero. So far, the only thing that works is the
array
formula:

=SUM(EXACT(A1:A54,"TOTAL")*IF(ISNUMBER(B1:B54),B1: B54))

But I was hoping to avoid an array formula by using SUMPRODUCT.

Is there a non-array formula solution?


Try...

=SUMPRODUCT(--(EXACT(A1:A54,"TOTAL")),B1:B54)

However, if case-sensitivity is not an issue, the following should
suffice...

=SUMIF(A1:A54,"Total",B1:B54)

--
Domenic
http://www.xl-central.com


 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:52 PM.


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