Archive of Mr Excel Message Board

Back to Forms in Excel VBA archive index
Back to archive home

A stupid summing problem - help!
Posted by Rob Field on August 13, 2001 4:47 AM
Guys - I can't for the life of me get my head round this problem. Column A contains a list of numbers, a lot with duplicates and multiple duplicates, column B has values. All I want to do is sum the values in column B corresponding to the values in column A. Ie. Col A may have 1001,1001,1002,1002,1002,1002,1003 etc. Col B has 1,2,1,1,1,2,1. All I want to do is have 1001 = 3, 1002 = 5, 1003 = 1 etc - I'm just summing the Col B values where the Col A values are the same. Thing is, I can do it in my head, but not on the worksheet - any help would be gratefully received.
Rgds
Rob

| Check out our Excel Resources
|
 |
 |
Re: A stupid summing problem - help!
Posted by Ian on August 13, 2001 4:59 AM
use
=SUMIF(A1:A7,1001,B1:B7)
or you could put a cell to the left of the sumif
=SUMIF(A1:A7,A8,B1:B7)
where the value 1001 is typed in A8
Good luck
Ian

Re: A stupid summing problem - help!
Posted by Rob Field on August 13, 2001 5:47 AM
Thanks Ian
You're a top man - worked first time with little change
Thanks again
Rgds
Rob

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.