#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Need a formula

This should be easy - but I'm having trouble with it. I have columns A and B
with data like this:

A B

X 5
X 2
Y 1
X 4
Y 3

I want column C to be the total for the table of the value in A. So column
C should have

11
11
4
11
4

Since wherever there is an X in column A the total of the X's is 11(5+2+4),
and wherever there is a Y in column A the total of the Y's is 4 (1+3). I
would appreciate the formula for column C - thanks for any help on this.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Need a formula

=SUMIF($B$1:$B$10,A1)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"dhstein" wrote in message
...
This should be easy - but I'm having trouble with it. I have columns A
and B
with data like this:

A B

X 5
X 2
Y 1
X 4
Y 3

I want column C to be the total for the table of the value in A. So
column
C should have

11
11
4
11
4

Since wherever there is an X in column A the total of the X's is
11(5+2+4),
and wherever there is a Y in column A the total of the Y's is 4 (1+3). I
would appreciate the formula for column C - thanks for any help on this.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Need a formula

Think of SUMIF ..

Assume data as posted in A1:B1 down
In C1: =SUMIF(A:A,A1,B:B)
Copy down

Saviour the moment? Click YES below.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"dhstein" wrote:
This should be easy - but I'm having trouble with it. I have columns A and B
with data like this:

A B

X 5
X 2
Y 1
X 4
Y 3

I want column C to be the total for the table of the value in A. So column
C should have

11
11
4
11
4

Since wherever there is an X in column A the total of the X's is 11(5+2+4),
and wherever there is a Y in column A the total of the Y's is 4 (1+3). I
would appreciate the formula for column C - thanks for any help on this.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Need a formula


Thanks Max and Bernard - I just had a temporary brain freeze - but now it's
all thawed.


"Bernard Liengme" wrote:

=SUMIF($B$1:$B$10,A1)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"dhstein" wrote in message
...
This should be easy - but I'm having trouble with it. I have columns A
and B
with data like this:

A B

X 5
X 2
Y 1
X 4
Y 3

I want column C to be the total for the table of the value in A. So
column
C should have

11
11
4
11
4

Since wherever there is an X in column A the total of the X's is
11(5+2+4),
and wherever there is a Y in column A the total of the Y's is 4 (1+3). I
would appreciate the formula for column C - thanks for any help on this.




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



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