Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PFB PFB is offline
external usenet poster
 
Posts: 12
Default SUMPRODUCT won't work on a row

The following formula works on a column range (A1:A40), but not on a row
range (A10:U10). What have I missd?

=SUMPRODUCT(--(A10:U10={"P","B","S","V","H","PBSVH"}))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default SUMPRODUCT won't work on a row

You need to transpose your array:

=SUMPRODUCT(--(A10:U10={"P";"B";"S";"V";"H";"PBSVH"}))

Note the semicolons instead of commas....

HTH,
Bernie
MS Excel MVP


"PFB" wrote in message
...
The following formula works on a column range (A1:A40), but not on a row
range (A10:U10). What have I missd?

=SUMPRODUCT(--(A10:U10={"P","B","S","V","H","PBSVH"}))



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT won't work on a row

You have to make the array constant a vertical array. Using commas makes it
a horizontal array. Replace the commas with semicolons:

=SUMPRODUCT(--(A10:U10={"P";"B";"S";"V";"H";"PBSVH"}))

--
Biff
Microsoft Excel MVP


"PFB" wrote in message
...
The following formula works on a column range (A1:A40), but not on a row
range (A10:U10). What have I missd?

=SUMPRODUCT(--(A10:U10={"P","B","S","V","H","PBSVH"}))



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PFB PFB is offline
external usenet poster
 
Posts: 12
Default SUMPRODUCT won't work on a row

Thanks! Where can I find info on why a horizontal (row) data set must be
tested against a vertical array? (Yes, I'm new to this.)

"T. Valko" wrote:

You have to make the array constant a vertical array. Using commas makes it
a horizontal array. Replace the commas with semicolons:

=SUMPRODUCT(--(A10:U10={"P";"B";"S";"V";"H";"PBSVH"}))

--
Biff
Microsoft Excel MVP


"PFB" wrote in message
...
The following formula works on a column range (A1:A40), but not on a row
range (A10:U10). What have I missd?

=SUMPRODUCT(--(A10:U10={"P","B","S","V","H","PBSVH"}))




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT won't work on a row

I'm not sure if it's mentioned at this site or not but you'll find lots of
info:

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

--
Biff
Microsoft Excel MVP


"PFB" wrote in message
...
Thanks! Where can I find info on why a horizontal (row) data set must be
tested against a vertical array? (Yes, I'm new to this.)

"T. Valko" wrote:

You have to make the array constant a vertical array. Using commas makes
it
a horizontal array. Replace the commas with semicolons:

=SUMPRODUCT(--(A10:U10={"P";"B";"S";"V";"H";"PBSVH"}))

--
Biff
Microsoft Excel MVP


"PFB" wrote in message
...
The following formula works on a column range (A1:A40), but not on a
row
range (A10:U10). What have I missd?

=SUMPRODUCT(--(A10:U10={"P","B","S","V","H","PBSVH"}))








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default SUMPRODUCT won't work on a row

I don't believe that it mentions transposing an array constant, but it does
mention transposing a range array using TRANSPOSE, which is the same effect,
i.e.

=SUMPRODUCT(--(A10:U10=TRANSPOSE({"P","B","S","V","H","PBSVH"})) )

--
__________________________________
HTH

Bob

"T. Valko" wrote in message
...
I'm not sure if it's mentioned at this site or not but you'll find lots of
info:

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

--
Biff
Microsoft Excel MVP


"PFB" wrote in message
...
Thanks! Where can I find info on why a horizontal (row) data set must be
tested against a vertical array? (Yes, I'm new to this.)

"T. Valko" wrote:

You have to make the array constant a vertical array. Using commas
makes it
a horizontal array. Replace the commas with semicolons:

=SUMPRODUCT(--(A10:U10={"P";"B";"S";"V";"H";"PBSVH"}))

--
Biff
Microsoft Excel MVP


"PFB" wrote in message
...
The following formula works on a column range (A1:A40), but not on a
row
range (A10:U10). What have I missd?

=SUMPRODUCT(--(A10:U10={"P","B","S","V","H","PBSVH"}))







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
Should this work? =SUMPRODUCT( --($K$3:$K$4650&D3),... pgarcia Excel Discussion (Misc queries) 8 November 28th 07 08:19 PM
I have never been able to get a SumProduct formula to work..Help! BAC Excel Worksheet Functions 5 October 18th 07 09:46 PM
SUMPRODUCT vs. COUNTIF -- Why does one work? javamom Excel Worksheet Functions 3 April 25th 06 06:21 PM
sumproduct doesn't work Bonkers Excel Worksheet Functions 9 April 22nd 06 05:28 PM
Will SUMPRODUCT work for this? Aaron Saulisberry Excel Discussion (Misc queries) 4 January 25th 06 01:05 PM


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