bigmeld

New Member
Joined
Jun 1, 2012
Messages
8
Hello


I have a data table (columns A and B) which I could summariseusing a pivot table but don't want to as I want to perform some further work onthe data in the data table itself.

I can sum up the values for each person and can do that incolumn C using a simple SUMIF function but as you can see in green it returnsduplicates where the name in column A is repeated.

The question is; what formula would I need to achieve aresult as shown in column D (I typed the values in manually) such that the totalonly appears for the first time the person’s name is listed. So for example Sarah is listed 4 times but Ionly wish her total of 122 to be returned against the first entry for hername.

I was hoping to achieve this without VBA.

Appreciate the help folks!!





Thanks


A
B
C
D
1
Person
Amount
Total - formula is =SUMIF($A$2:$A$17,A2,$B$2:$B$17)
How do I Achieve This Result?
2
Andrew
50
149
149
3
Bob
60
141
141
4
Chuck
98
128
128
5
Frank
14
14
14
6
Sarah
25
122
122
7
Veronica
63
130
130
8
Chris
73
114
114
9
Sarah
55
122
10
Sarah
26
122
11
Stuart
66
66
66
12
Bob
81
141
13
Chuck
30
128
14
Veronica
67
130
15
Chris
41
114
16
Sarah
16
122
17
Andrew
99
149

<tbody>
</tbody>




 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You can test for the name appearing previously using COUNTIF:

=IF(COUNTIF($A$1:$A1,A2)>0,"",SUMIF(A:A,A2,B:B))
 
Upvote 0
How about
=IF(COUNTIF($A$2:A2,A2)=1,SUMIF($A$2:$A$17,A2,$B$2:$B$17),"")
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,739
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top