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 Condition



 
 
Thread Tools Display Modes
  #1  
Old June 8th, 2009, 03:07 PM posted to microsoft.public.excel.worksheet.functions
Adam Bradley
external usenet poster
 
Posts: 1
Default SUM Condition

I have collumn A as referece numbers such as 0535 which relate to several
values in collumn D eg.
0535 £235
0535 £82
0535 £9523
4966 £12
0535 £534
4966 £211
0535 £23

I need a formula to get the totals of each reference (0535, 4966). Can
anyone make a suggestion please?
  #4  
Old June 8th, 2009, 04:04 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default SUM Condition

Try this:

=SUMIF(A:A,"0535",B:B)

A better approach would be to list all the individual reference
numbers, say in column D starting with D1, then you could put this in
E1:

=SUMIF(A:A,D1,B:B)

Then you can copy this down for as many entries as you have in column
D. Ensure that the entries in D are of the same format as those in
column A (i.e. text in your example).

Hope this helps.

Pete

On Jun 8, 3:07*pm, Adam Bradley Adam
wrote:
I have collumn A as referece numbers such as 0535 which relate to several
values in collumn D *eg.
0535 * * * * *£235
0535 * * * * *£82
0535 * * * * *£9523
4966 * * * * *£12
0535 * * * * *£534
4966 * * * * *£211
0535 * * * * *£23

I need a formula to get the totals of each reference (0535, 4966). *Can
anyone make a suggestion please?


  #5  
Old June 8th, 2009, 04:16 PM posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default SUM Condition

Hi,

In general I prefer SUMIF, when it can be used, over SUMPRODUCT because it
is faster, and a little less obtuse.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Adam Bradley" wrote:

Thanks, I ended up using SUMIF...

=SUMIF(Data!C:C,4966,Data!E:E) etc

Although I prefer your syntax : )

"JoeU2004" wrote:

"Adam Bradley" Adam wrote:
I need a formula to get the totals of each reference (0535, 4966).


=sumproduct((A1:A7="0535")*(D17))

=sumproduct((A1:A7)="4966")*(D17))

Those say: "sum the values in D17 that match the value in A1:A7".

That assume that A1:A7 contains text. If it contains number, remove the
quotes from 0535 and 4966 above.


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

"Adam Bradley" Adam
wrote in message
...
I have collumn A as referece numbers such as 0535 which relate to several
values in collumn D eg.
0535 £235
0535 £82
0535 £9523
4966 £12
0535 £534
4966 £211
0535 £23

I need a formula to get the totals of each reference (0535, 4966). Can
anyone make a suggestion please?



 




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 11:16 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.