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.
0
Utf
3/15/2010 9:31:02 PM
excel.worksheet.functions 4936 articles. 2 followers. Follow

2 Replies
1173 Views

Similar Articles

[PageSpeed] 30

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" <rk@discussions.microsoft.com> wrote in message 
news:452AD9D0-F114-418D-A814-3F27425DF7F5@microsoft.com...
>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. 


0
T
3/15/2010 9:57:30 PM
> =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.
0
Utf
3/15/2010 10:34:01 PM
Reply:

Similar Artilces:

how can I compare contents of columns in excel?
I have two excel files viz. file-A and -B. One of the columns of File-A contains chemical names which is also contained in one of the File-B columns.There are a lot more chemical names in the latter file than in the former. What I would like to do is to transfer additional pertinent information from columns in File-B to new columns in File-A on the basis of the chemical names found in File-A. At the end of the exercise I would have a file with the same number of chemicals but with more information. How can I do it? Your help would be much appreciated. Take a look at the =vlookup() ...

Best Way ?
G'day All, Looking for some information. With Outlook you can have all your contacts...address, email address, yada, yada, yada. Can I use this information in to say mail merge with Word and email a letter to the ppl with email addresses? Or is this better done with a Access? The reason I ask is that we want to deliver an email to all our clients with the latest promotions. And want it to be a bit more automated? Any information or pointers in the right direction would be appreciated. Have a good one, Scott V You can use either Access or Outlook as the data source for a ma...

'Recently used file' list.
When I open Excel nine filenames appear on the RHS as 'recently used files' (this number was set via Tools/Options/General, of course). In the middle of this list are 3 no-longer-used files. Though the files themselves have been deleted their names remain in this list. Is there an easy way to remove those entries from that list, please? TIA, DB. There is an entry in the help file "Display or hide recently used workbooks on the File menu" which says uncheck the 'recently used files' checkbox, the click OK. Then, basically, start again. "DB.&...

Is there a way to color code Outlook Contact File Folder Labels?
Is there a way to color code Outlook Contact File Folder Labels? No. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Join OneNote Tips mailing list: http://www.onenote-tips.net/ "isailhbca" <isailhbca@discussions.microsoft.com> wrote in message news:4DBD10F7-FAA0-4102-A4C3-E2697908EFE8@microsoft.com... >...

Selecting and moving chart(s) within a worksheet using keyboard ke
Hi all, I have created some charts in a worksheet. I would like to be able to do the following if possible: 1. I have selected a chart (by clicking on the chart and handles appeared around the perimeter of the chart). What I would like to do is to be able to select the chart using keyboard short-cut and to move the chart around the worksheet also using keyboard keys rather than the mouse. At the moment I can only move it (a single chart) using the mouse. However strangely enough, if I select two or more charts (Shift+ Lt.Click) I am able to then use the arrow keys to move the chart. ...

A way to create sub-categories?
I want to group contacts by category and then a sub-category for easy viewing. Apart from creating a new field for sub-category is there a way of doing this? Outlook doesn't seem to support sub-categories. Thanks Nope. -- Patricia Cardoza Outlook MVP Author - Special Edition Using Microsoft Office Outlook 2003 Lead Author - Access 2003 VBA Programmer's Reference Author - Absolute Beginner's Guide to Microsoft OneNote 2003 http://blogs.officezealot.com/cardoza http://www.cardozasolutions.com "Casebase" <junkmail@casebase.net> wrote in message news:%23rx5a...

How to implement multiple joins with LINQ?
The following code compiles and runs but does not produce the correct output. I get the same product names listed over and over again. I want to create customer objects that have a list of orders that in turn, have a list of order-details. I'm using the famous Northwind Sample Database on SQL Express. I am indeed getting the desired data structures with the wrong contents. I did some google searching for examples but could not find an example of a double join that exploits this cool feature of grouping. I'm trying to extrapolate from http://msdn.microsoft.com/en-us...

Newsreader when using Outlook
I'm just transition to Outlook (from OE). Just wondering about news-readers. I use OE as a news-reader at the moment. But it's not apparent that that is possible in Outlook proper. If this is so - what are Outlook user's doing in this reagards? Many thanks. === Phil (NZ) You are in luck. OE is the news reader for Outlook. Always has been. Always will be. -- Russ Valentine [MVP-Outlook] "Phil Jones" <phil_newsgroup@hotmail.com> wrote in message news:%23lEn6sibFHA.2756@tk2msftngp13.phx.gbl... > I'm just transition to Outlook (from OE). > > Just...

is there a way to crop a corner out of a rectangular image in Visi
Using subtract on two shapes accomplishes what i want to do, but when the first shape is a .gif image, it does not work. No, the "boolean operations", as they're called, do not operate on foreign objects like bitmaps and controls. Visio has crop functionality for imported graphics, but it is only rectangular. You could draw a small white triangle and give it "no line". Then place it over the corner of your bitmap. -- Hope this helps, Chris Roth Visio MVP "doug" <doug@discussions.microsoft.com> wrote in message news:29D479A6-6099-4051-B7A0-1...

Add Publish Column to Enterprise Template
I've tried to add the Publish column set to the value of Yes to an Enterprise project template but the column will not save. Any ideas? -- Carla Evans Presbyterian Health Plan Hi Carla, This worked for me. What error message(s) did you get? -- Thanks, Ben. Microsoft Most Valuable Professional http://appleparkltd.spaces.live.com/ "Carla Evans" wrote: > I've tried to add the Publish column set to the value of Yes to an Enterprise > project template but the column will not save. Any ideas? > -- > Carla Evans > Presbyterian Healt...

Help with custom search form
I have a search form that retrieves records in a subform based on criteria entered into unbound text boxes on the main/parent form. The subform is tied to a SQL recordset that contains a field called “Select”. The field’s datatype is Yes/No. On the main form I have a button called “View Selected” with the following code in the OnClick event: Private Sub cmdViewSelected_Click() On Error GoTo Err_cmdViewSelected_Click Dim i As Integer i = DCount("ProjectId", "ProjectTbl", "[Select] = " & True) If i = 0 Then MsgBox "No Record(s...

Use tiltle in a cell
Is there a way to use the title of the spreadsheet as a cell value? I asked this before in another topic, but there was no reply. My sheet get's it's title from a database and is variable. So if i can use the title i can strip several characters from the title and use this. So I want to retrieve the title of the spreadsheet and use this in a cell. Thanks! The name of a worksheet can be extracted to a cell with: =MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255) best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from em...

is there a way to change the time card repor format?
i'm using activereports in RMS to generate a custome timecard report. for my timein and timeout colums, the datatype i have assigned to the columns is vbDate. when I generate the report, the columns only show the date as mm/dd/yyyy, they do not show the time of day piece for exactly when the cashier punched in or out. is there any way to change the formatting of this so that in the report the time shows up? for example, instead of showing 2/6/2005 in the time in column, it would show 2/5/2005 8:00:00 AM. thanks in advance, kevin There is a timecard report on the Reports Library...

Using DoCmd.SendObject
Hi, My default e-mail client is outlook2007 and configured to connect to an Exchange server.Is there any possibility of DoCmd.SendObject open Vista Windows Mail instead of Outlook 2007? If no, can someone tell me another procedure to do that. Thanks CJA Tony Toews has some good info here about various approaches to sending email from Access: http://www.granite.ab.ca/access/email.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "CJA" <car...

How to generate a mailbox list file to use in scheduled ExMerge
Hi! Anyone know how I can generate a file that contains a list of mailboxes to be used with scheduled ExMerge? I tried to interactively run ExMerge, then cancell the program halfway, but it does not create the file I need. An alternative for creating the file would be to use an LDAP query in a script -- if anyone can help with that as well. Thanks MosesM On Wed, 4 Jan 2006 11:05:04 -0800, MosesM <MosesM@discussions.microsoft.com> wrote: >Hi! Anyone know how I can generate a file that contains a list of mailboxes >to be used with scheduled ExMerge? I tried to interactively ru...

Uses for Autotext Cleanup
Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel Email Client: Exchange Hello, <br><br>I'm still very new to Entourage and I'm looking for some tangible reasons to use the Autotext Cleanup in 2004. Do people really use it? <br><br>I would like to pass these examples on to staff. <br><br>Thanks for your help robomac@officeformac.com wrote: > I'm still very new to Entourage and I'm looking for some tangible > reasons to use the Autotext Cleanup in 2004. Do people really use it? > > I would like ...

best way to deserialize xml
I'm at a quandry as to what's the best/fastest way to deserialize an incoming xml stream? I ran a small test on xmlserializer and on a small file it performed 10 times worse then when I used the XMLDocument and deserialized the values myself. Is the xmlserializer really that slow? I'm expecting a file about 1 MB in length and if it's that slow on a 2 K file then I can't phantom how it's going to behave on a 1 MB file. Should I just skip the xmlserializer and XML Dom and go straight to xmlreader and do the deserialization myself? This has been discussed a few times...

Can You Count This Way?
I have some cells with note type data: For ex: ax,3b7,22,xy,zz, Is there a way to count every item between the commas? Thanks. Hi try =LEN(A1)-LEN(SUBSTITUTE(A1,",","")+LEN(A1)>0 -- Regards Frank Kabel Frankfurt, Germany Timothy Wright wrote: > I have some cells with note type data: > > For ex: > > ax,3b7,22,xy,zz, > > Is there a way to count every item between the commas? > > Thanks. On Wed, 19 May 2004 20:13:53 +0200, "Frank Kabel" <frank.kabel@freenet.de> wrote: >Hi >try >=LEN(A1)-LEN(SUBSTITUTE(A1,&q...

Microsoft Office on Mac using Bootcamp or Microsoft for Mac products?
I'm a new Mac user - just got a new Intel Core 2 Duo processor MacBook. I went ahead and bought the Office for Mac and installed everything. My main problem/question is that I find I can't do as many things in Entourage as I could in Outlook. (For instance, can't change colors and customize calendar as well, can't set up as many defaults like what view I want Entourage to open in.) I was thinking about using bootcamp and trying to go back to my Outlook I used to love. Any advice as to whether this is a good idea or bad idea? Also, keep in mind that I am synching successful...

Using OE with my Juno e-mail account
I use Juno e-mail but I noticed that I also have Outlook Express on my computer which I would prefer to use. Is there a way to send and receive e-mail using OE but keeping my Juno address and service? I have a standard dial-up connection. OS is Win98SE. If this is possible, I would need simple, step-by-step instructions for setting it up. Thank you, Relztrah Try posting this in an Outlook Express news group - this is not one of them. Outlook is a part of Microsoft Office and is what this group supports. Outlook Express is a part of Internet Explorer and has its own news groups. You ca...

Is there a way to Sort data by color in Excel?
I am trying to sort data by color, is that possible? see http://www.xldynamic.com/source/xld.ColourCounter.html#sorting -- HTH Bob Phillips "SRTUC" <SRTUC@discussions.microsoft.com> wrote in message news:B5121232-FB1D-46AF-94F8-04B7EAA2D90C@microsoft.com... > I am trying to sort data by color, is that possible? You're gonna need a User defined function to get the value of a color. See Chip Pearson's site for a nice version: http://www.cpearson.com/excel/colors.htm Look for: Returning The ColorIndex Of A Cell Then you could use that UDF in a separate colu...

Sizing the Chart Sheet using VBA
Hi all, I'm attempting some code that will take the height and width values from an active Word table cell, and then use them to adjust the page margins of an active Excel chart sheet, with the end result being both the Word cell and Excel chart sheet share identical dimensions. Unfortunately, the code seems a little beyond me. Is it possible? Any help (or code) much appreciated ... Best wishes to all, Rich ...

Fastest way to load an xml file into an array in .net
Hi All VS 2005 SP1 (C#, VB.NET) I need the absolut fastest way of loading an xml-file of about 700KB into an array. I need to load about 1500 of those xml-Files into arrays on startup of my application. Therefore it needs to be as fast as possible. Please also tell me if the xml structure can be improved. the xml looks like: y: Year m: Month h: Hour value <data> <v y="1998" m="1" h="1">0.227777109151971</v> <v y="1998" m="1" h="2">0.206573903224972</v> <v y="1998" m="1"...

Customer Relationship
CRM 3.0 If a user opens up the Account or Contact entity, the Relatinoships icon in the left menu is available. When clicking the Relationships icon, a view of existing Customer Relationships is displayed. Our implementation shows 4 columns (as I believe everyones' does): Party 1, Role 1, Role 2, Party 2. A while back, users had the ability to click on those column headers to sort the records how they wanted. But for some reason, the application today has no default sort order and does not allow the selection of a column header at all. The only thing one of our end users could...

Using dates with hyperlinks
i am using a very large spreadsheet with hyper links to related word files. These hyperlinks are created automatically based on cell contents. but i am having trouble when using a date formatted cell. currently i am using the format ddmmyy, but when it is used as i hyperlink, its reverts back to the serial number. is there any way to stop this? hope i explained that right! Try creating a folder on your desktop and dumping the word files into it. I have a lawn mower and I would not use it to paint a house. "jeegna" wrote: > i am using a very large spreadsheet with hyper ...