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  

Is there a way to use a multiple column array in SUMPRODUCT?



 
 
Thread Tools Display Modes
  #1  
Old March 15th, 2010, 09:31 PM posted to microsoft.public.excel.worksheet.functions
rk
external usenet poster
 
Posts: 40
Default Is there a way to use a multiple column array in SUMPRODUCT?

I am attempting to use SUMPRODUCT to pull values froma multiple column
spreadsheet and add them together. I am able to get the SUMPRODUCT to work
if I am only looking for values in one column, but as soon as I select all
columns, the function no longer works.

example: column A holds accounts, column B holds subaccounts, columns D - F
(possibility of over 100 columns) hold companies

I am looking for all values to be added together that hold values for both
column A and column B

=SUMPRODUCT(--(A2:A61=A44),--(B2:B61=B44)--(F2:F61)) works for just column
F, but when I try to add more columns, i.e., D - F, the function no longer
works.

Is there a way to expand this function or nest another function (maybe
SUMIF) to do this?

A B C D E F
100 121 account descrip 89.00 - 900.00
200 131 account descrip - - 10,000.00
300 141 account descrip - - 101.50
400 151 account descrip - - 895.30
500 161 account descrip - - -

So with the formula I have now, I am getting an answer of 900.00, but what I
would really like to get is the answer 989.00.
  #2  
Old March 15th, 2010, 09:57 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Is there a way to use a multiple column array in SUMPRODUCT?

Maybe something like this...

=SUMPRODUCT((A2:A61=A44)*(B2:B61=B44)*D2:F61)

If the range to sum also contains TEXT this will not work.

--
Biff
Microsoft Excel MVP


"rk" wrote in message
...
I am attempting to use SUMPRODUCT to pull values froma multiple column
spreadsheet and add them together. I am able to get the SUMPRODUCT to
work
if I am only looking for values in one column, but as soon as I select all
columns, the function no longer works.

example: column A holds accounts, column B holds subaccounts, columns D -
F
(possibility of over 100 columns) hold companies

I am looking for all values to be added together that hold values for both
column A and column B

=SUMPRODUCT(--(A2:A61=A44),--(B2:B61=B44)--(F2:F61)) works for just column
F, but when I try to add more columns, i.e., D - F, the function no longer
works.

Is there a way to expand this function or nest another function (maybe
SUMIF) to do this?

A B C D E F
100 121 account descrip 89.00 - 900.00
200 131 account descrip - - 10,000.00
300 141 account descrip - - 101.50
400 151 account descrip - - 895.30
500 161 account descrip - - -

So with the formula I have now, I am getting an answer of 900.00, but what
I
would really like to get is the answer 989.00.



  #3  
Old March 15th, 2010, 10:34 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default Is there a way to use a multiple column array in SUMPRODUCT?

=SUMPRODUCT(--(A2:A61=A44),--(B2:B61=B44)--(F2:F61)) works for just column
F, but when I try to add more columns, i.e., D - F, the function no longer
works.



Try it like this:

=SUMPRODUCT((A2:A61=A44)*(B2:B61=B44)*D2:F61)



"rk" wrote:

I am attempting to use SUMPRODUCT to pull values froma multiple column
spreadsheet and add them together. I am able to get the SUMPRODUCT to work
if I am only looking for values in one column, but as soon as I select all
columns, the function no longer works.

example: column A holds accounts, column B holds subaccounts, columns D - F
(possibility of over 100 columns) hold companies

I am looking for all values to be added together that hold values for both
column A and column B

=SUMPRODUCT(--(A2:A61=A44),--(B2:B61=B44)--(F2:F61)) works for just column
F, but when I try to add more columns, i.e., D - F, the function no longer
works.

Is there a way to expand this function or nest another function (maybe
SUMIF) to do this?

A B C D E F
100 121 account descrip 89.00 - 900.00
200 131 account descrip - - 10,000.00
300 141 account descrip - - 101.50
400 151 account descrip - - 895.30
500 161 account descrip - - -

So with the formula I have now, I am getting an answer of 900.00, but what I
would really like to get is the answer 989.00.

 




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 08:27 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.