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  

SUM all Instances Q



 
 
Thread Tools Display Modes
  #11  
Old March 6th, 2010, 04:01 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default SUM all Instances Q

Are you using xl2007?

If you are, you may want to try =sum(sumifs(...))
(I didn't load xl2007 to try that.)

But this seemed to work for me in xl2003:

=SUM(SUMPRODUCT((A1:A10="London")*(B1:B10={1,2,3,4 ,5})*D110))

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Seanie wrote:

A further twist on =SUM(SUMIF(B:B,{1,2,3,4,5},D))

How could I incorporate a further criteria eg. If ColA contains
"London" and if ColB contains one of 1,2,3,4,5 then add up all those
instance in ColD


--

Dave Peterson
  #12  
Old March 6th, 2010, 07:40 PM posted to microsoft.public.excel.worksheet.functions
Seanie
external usenet poster
 
Posts: 71
Default SUM all Instances Q

Yes Dave, using 2007. Would replacing 1,2,3,4,5 etc with a Range Name
where all my values listed work? - just can't test this as this moment


  #13  
Old March 6th, 2010, 08:19 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default SUM all Instances Q

I don't have xl2007 on this pc.

But post back with your results bg.

Seanie wrote:

Yes Dave, using 2007. Would replacing 1,2,3,4,5 etc with a Range Name
where all my values listed work? - just can't test this as this moment


--

Dave Peterson
  #14  
Old March 7th, 2010, 07:54 AM posted to microsoft.public.excel.worksheet.functions
Seanie
external usenet poster
 
Posts: 71
Default SUM all Instances Q

I tried below, which should just return all "Londons" Sales of 18,20,
32 etc etc, but I get a #Value

=SUM(SUMPRODUCT(('Sales Mix'!A:A="London")*('Sales Mix'!
B:B={18,20,32,140,172,208,212,500,99,204,203})*'Sa les Mix'!D))



This formula below gives me the correct total sales I'm after in all
Areas

=SUM(SUMIF('Sales Mix'!B:B,
{18,20,32,140,172,208,212,500,99,204,203},'Sales Mix'!D))

  #15  
Old March 7th, 2010, 01:02 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default SUM all Instances Q

I'm guessing that you have some non-numeric entry in column D.

=sum(a1:b1)
will ignore text entries

But using multiplication
=a1*b1
will result in a #value! error.

Seanie wrote:

I tried below, which should just return all "Londons" Sales of 18,20,
32 etc etc, but I get a #Value

=SUM(SUMPRODUCT(('Sales Mix'!A:A="London")*('Sales Mix'!
B:B={18,20,32,140,172,208,212,500,99,204,203})*'Sa les Mix'!D))

This formula below gives me the correct total sales I'm after in all
Areas

=SUM(SUMIF('Sales Mix'!B:B,
{18,20,32,140,172,208,212,500,99,204,203},'Sales Mix'!D))


--

Dave Peterson
  #16  
Old March 7th, 2010, 02:45 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default SUM all Instances Q

I could have used:
=a1+b1
will fail if either contains non-numeric data (just to be consistent with the
=sum()).

Dave Peterson wrote:

I'm guessing that you have some non-numeric entry in column D.

=sum(a1:b1)
will ignore text entries

But using multiplication
=a1*b1
will result in a #value! error.

Seanie wrote:

I tried below, which should just return all "Londons" Sales of 18,20,
32 etc etc, but I get a #Value

=SUM(SUMPRODUCT(('Sales Mix'!A:A="London")*('Sales Mix'!
B:B={18,20,32,140,172,208,212,500,99,204,203})*'Sa les Mix'!D))

This formula below gives me the correct total sales I'm after in all
Areas

=SUM(SUMIF('Sales Mix'!B:B,
{18,20,32,140,172,208,212,500,99,204,203},'Sales Mix'!D))


--

Dave Peterson


--

Dave Peterson
 




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 04:05 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.