Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
SDM SDM is offline
external usenet poster
 
Posts: 9
Default Sum if another column matches

I have a column A of numbers with a corresponding 2nd column B of amounts. If
the number in a cell of column A matches the number any another cells in
column A, I want to add the corresponding amount from column B into the cell
in column C. e.g.:
A B C
1 88 10 50
2 63 30 230
3 88 40 50
4 23 100 100
5 63 200 230

Stated differently:
- If there are no matches in column A, then the cell in column C gets just
the value from column B.

- If there are matching entries in column A, then I want all of the
corresponding values from column B summed into the cell in column C.

Am I making any sense? Thanks!
--
sdm
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 913
Default Sum if another column matches

On Thu, 31 Jul 2008 15:09:01 -0700, sdm
wrote:

I have a column A of numbers with a corresponding 2nd column B of amounts. If
the number in a cell of column A matches the number any another cells in
column A, I want to add the corresponding amount from column B into the cell
in column C. e.g.:
A B C
1 88 10 50
2 63 30 230
3 88 40 50
4 23 100 100
5 63 200 230

Stated differently:
- If there are no matches in column A, then the cell in column C gets just
the value from column B.

- If there are matching entries in column A, then I want all of the
corresponding values from column B summed into the cell in column C.

Am I making any sense? Thanks!



Try this formula in cell C1

=SUMPRODUCT((A$1:A$10=A1)*(B$1:B$10))

Copy down as far as needed

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,593
Default Sum if another column matches

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

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"sdm" wrote in message
...
I have a column A of numbers with a corresponding 2nd column B of amounts.
If
the number in a cell of column A matches the number any another cells in
column A, I want to add the corresponding amount from column B into the
cell
in column C. e.g.:
A B C
1 88 10 50
2 63 30 230
3 88 40 50
4 23 100 100
5 63 200 230

Stated differently:
- If there are no matches in column A, then the cell in column C gets
just
the value from column B.

- If there are matching entries in column A, then I want all of the
corresponding values from column B summed into the cell in column C.

Am I making any sense? Thanks!
--
sdm



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
Maddening Dilemma - Compare each cell within column a to each cell in column b and find unique matches [email protected] Excel Worksheet Functions 66 May 1st 23 03:44 AM
Display list from one colum if value in other column matches x rerhart Excel Discussion (Misc queries) 5 August 15th 06 10:29 PM
Comparing 2 column for matches IFIXPCS Excel Discussion (Misc queries) 0 February 22nd 06 03:09 PM
data that matches exact column and row raraschek Excel Worksheet Functions 4 January 23rd 06 08:06 PM
Using VLOOKUP with multiple first column matches John Simons Excel Worksheet Functions 2 February 20th 05 01:27 AM


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