Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default sum if column has similar values (cusip)

trying to write a formula that adds values in one column if another column
contains like values (cusip)

can't do sumif because the value changes every 2 - 10 cells or so and there
are 1400 lines in spreadsheet and about 300 cusips

I want it sum by cusip. I know there's a simple way but I've exhausted my
search.

example

cusip amt sum by cusip
912810FE3 300
912810FE3 500 800
912803BL6 100
912803BL6 200
912803BL6 300 600

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default sum if column has similar values (cusip)

Use a Pivot Table
--
Gary''s Student - gsnu200814


"novice" wrote:

trying to write a formula that adds values in one column if another column
contains like values (cusip)

can't do sumif because the value changes every 2 - 10 cells or so and there
are 1400 lines in spreadsheet and about 300 cusips

I want it sum by cusip. I know there's a simple way but I've exhausted my
search.

example

cusip amt sum by cusip
912810FE3 300
912810FE3 500 800
912803BL6 100
912803BL6 200
912803BL6 300 600

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default sum if column has similar values (cusip)

Assuming you have CUSIP in Col A and amount in Col B with header rows

IMP: Change 1500 in all formulas to the last row containing your data

1. Enter this in D2
=COUNTIF(A2:$A$1500,A2)
and copy down till end of your data

2. Filter your data on Col D equal to 1

3. Enter this in the first row (AND change 2 in A2 to the first row in the
filter)
=SUMPRODUCT(--($A$1:$A$1500=A2),$B$1:$B$1500)
Copy this formula to the filtered rows

4. Remove filter, you should have the formula above in rows with 1 in Col D

5. Delete Col D and you are done
"novice" wrote:

trying to write a formula that adds values in one column if another column
contains like values (cusip)

can't do sumif because the value changes every 2 - 10 cells or so and there
are 1400 lines in spreadsheet and about 300 cusips

I want it sum by cusip. I know there's a simple way but I've exhausted my
search.

example

cusip amt sum by cusip
912810FE3 300
912810FE3 500 800
912803BL6 100
912803BL6 200
912803BL6 300 600

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 747
Default sum if column has similar values (cusip)

try this
assumed Col A has cusip
Col B has amount
in Cell C2 put this formula and drag it down

=IF(A2=A3,"",SUMIF($A$2:$A$100,A2,$B$2:$B$100))



On Nov 17, 10:42*pm, novice wrote:
trying to write a formula that adds values in one column if another column
contains like values (cusip)

can't do sumif because the value changes every 2 - 10 cells or so and there
are 1400 lines in spreadsheet and about 300 cusips

I want it sum by cusip. *I know there's a simple way but I've exhausted my
search.

example

cusip * * * * * * *amt * sum by cusip
912810FE3 *300
912810FE3 *500 * *800
912803BL6 *100
912803BL6 *200
912803BL6 *300 * *600


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
vlookup with similar lookup values Dave F[_2_] Excel Discussion (Misc queries) 3 July 5th 07 06:49 PM
Copying cells with similar column values mohd21uk via OfficeKB.com New Users to Excel 2 May 15th 06 09:32 AM
How to chart a single column of values similar to a GROUP BY Paddy Charts and Charting in Excel 3 December 2nd 05 04:29 AM
Counting cells, similar values SteW Excel Worksheet Functions 7 May 12th 05 07:05 PM
cusip (number and text) in same cell- How do use in excel? John K Excel Worksheet Functions 4 March 19th 05 07:38 PM


All times are GMT +1. The time now is 03:02 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"