Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Get sum of values in a cell based on unique values in another cell

Column A will contain Names
Column B will contain Different Amounts
I need Column C to contain the sum of Amounts for unique Names.

Some sample values are filled in Cell C( the way i require) in the attachments.

Your help in this regard will be highly appreciated.
Attached Files
File Type: zip Example.zip (6.7 KB, 72 views)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Get sum of values in a cell based on unique values in another cell

Hi,

Am Mon, 20 Aug 2012 06:16:42 +0000 schrieb Shorabh:

Column A will contain Names
Column B will contain Different Amounts
I need Column C to contain the sum of Amounts for unique Names.


in C2:
=SUMIF($A$2:$A$100,A2,$B$2:$B$100)
or
=SUMPRODUCT(--($A$2:$A$100=A2),$B$2:$B$100)


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Shorabh View Post
Column A will contain Names
Column B will contain Different Amounts
I need Column C to contain the sum of Amounts for unique Names.

Some sample values are filled in Cell C( the way i require) in the attachments.

Your help in this regard will be highly appreciated.
Hi,

Here is one way. Put the below formula into cell C2 and copy down as needed.

=IF(COUNTIF(A$2:A2,A2)=1,SUMIF(A$2:A$63,A2,B$2:B$6 3),"")
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default Get sum of values in a cell based on unique values in another cell

Shorabh formulated on Monday :
Column A will contain Names
Column B will contain Different Amounts
I need Column C to contain the sum of Amounts for unique Names.

Some sample values are filled in Cell C( the way i require) in the
attachments.

Your help in this regard will be highly appreciated.


+-------------------------------------------------------------------+
Filename: Example.zip |
Download: http://www.excelbanter.com/attachment.php?attachmentid=548|

+-------------------------------------------------------------------+


_R = Range("A2:A63") in your Sheet.

In E2 down:
{=IF(ROW(A1)<=SUM(IF(LEN(_R)0,1/COUNTIF(_R,_R))),INDEX(_R,MATCH(SMALL(IF(COUNTIF(O FFSET(_R,,,ROW(_R)-CELL("row",_R)+1),_R)=1,COUNTIF(_R,"<"&_R)),ROW(IN DIRECT(ROW(A1)&":"&ROWS(_R)))),COUNTIF(_R,"<"&_R), 0)),"")}
FormulaArray

In E2 down:
=SUMPRODUCT((_R=E2)*OFFSET(_R,,1))

Bruno


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
Copy values from a cell based on values of another cell Spence10169 Excel Discussion (Misc queries) 4 January 13th 09 10:01 AM
How to assign values to a cell based on values in another cell? Joao Lopes Excel Worksheet Functions 1 December 5th 07 09:02 PM
Using Formula based Cell Content Return Unique Consecutive Duplicate Values Sam via OfficeKB.com Excel Worksheet Functions 8 February 7th 07 11:33 PM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 11:34 PM.

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"