Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 124
Default how to sum contents of duplicate rows

Hi:
I have a worksheet with two columns and multiple rows. Column 1 has Names
and column 2 has salary.
Charles 15
John 20
John 15
Peter 50

I woul like to see (end result) something like this (note duplicate gone but
salary summed up)

Charles 15
John 35
Peter 50


Thank You Regards Charles
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default how to sum contents of duplicate rows

In C1: =A1
C2: IF(ISERROR(MATCH(0,COUNTIF(C$1:C1,$A$1:$A$20&""),0 )),"",
INDEX(IF(ISBLANK($A$1:$A$20),"",$A$1:$A$20),MATCH( 0,COUNTIF(C$1:C1,$A$1:$A$20&""),0)))

which is an array formula so commit with Ctrl-Shift-Enter, not just Enter.
Copy C2 as far as you need.

D1:=IF(C1="","",SUMIF(A:A,C1,B:B)

and copy down

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Charles" wrote in message
...
Hi:
I have a worksheet with two columns and multiple rows. Column 1 has Names
and column 2 has salary.
Charles 15
John 20
John 15
Peter 50

I woul like to see (end result) something like this (note duplicate gone
but
salary summed up)

Charles 15
John 35
Peter 50


Thank You Regards Charles



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
How do I remove Duplicate rows? 85225 Excel Discussion (Misc queries) 15 March 9th 07 11:41 PM
Remove duplicate rows based on 1 specific criterion Sweepea Excel Discussion (Misc queries) 5 August 30th 06 04:28 PM
Delete rows with duplicate values Smohrman Excel Worksheet Functions 14 May 5th 06 12:20 PM
Deleting duplicate rows Kevin Excel Discussion (Misc queries) 1 May 2nd 06 12:16 AM
Duplicate Rows jdkapa Setting up and Configuration of Excel 0 December 5th 05 12:50 AM


All times are GMT +1. The time now is 02:21 AM.

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"