Hi - the previous formula would show that 2 customers have three policies - I want a formula as well which would show that those customers with 3 policies (2 of them) have total profits of £390 (the total of Jones and Smith)
[TABLE="width: 195"]
<TBODY>[TR]
[TD="class: xl63, width: 65"]Name
[/TD]
[TD="class: xl63, width: 65"]Policy
[/TD]
[TD="class: xl63, width: 65"]Profit
[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl64"]Jones
[/TD]
[TD="class: xl64"]Home
[/TD]
[TD="class: xl65"]£60
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Jones
[/TD]
[TD="class: xl64"]Motor
[/TD]
[TD="class: xl65"]£55
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Kane
[/TD]
[TD="class: xl64"]Home
[/TD]
[TD="class: xl65"]£45
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Able
[/TD]
[TD="class: xl64"]Home
[/TD]
[TD="class: xl65"]£33
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Kennedy
[/TD]
[TD="class: xl64"]Motor
[/TD]
[TD="class: xl65"]£30
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Jones
[/TD]
[TD="class: xl64"]Travel
[/TD]
[TD="class: xl65"]£50
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Webster
[/TD]
[TD="class: xl64"]Home
[/TD]
[TD="class: xl65"]£45
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Williams
[/TD]
[TD="class: xl64"]Motor
[/TD]
[TD="class: xl65"]£48
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Williams
[/TD]
[TD="class: xl64"]Home
[/TD]
[TD="class: xl65"]£44
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Smith
[/TD]
[TD="class: xl64"]Home
[/TD]
[TD="class: xl65"]£55
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Smith
[/TD]
[TD="class: xl64"]Motor
[/TD]
[TD="class: xl65"]£90
[/TD]
[/TR]
[TR]
[TD="class: xl64"]Smith
[/TD]
[TD="class: xl64"]Travel
[/TD]
[TD="class: xl65"]£80
[/TD]
[/TR]
</TBODY>[/TABLE]
Hope that makes sense - thanks!!
Thanks for the sample and the example result...
[TABLE="width: 497"]
<COLGROUP><COL style="WIDTH: 78pt; mso-width-source: userset; mso-width-alt: 3697" width=104><COL style="WIDTH: 98pt; mso-width-source: userset; mso-width-alt: 4664" width=131><COL style="WIDTH: 52pt; mso-width-source: userset; mso-width-alt: 2474" width=70><COL style="WIDTH: 124pt; mso-width-source: userset; mso-width-alt: 5859" width=165><COL style="WIDTH: 49pt; mso-width-source: userset; mso-width-alt: 2332" width=66><COL style="WIDTH: 48pt" span=2 width=64><TBODY>[TR]
[TD="class: xl66, width: 104, bgcolor: transparent"]
Name[/TD]
[TD="class: xl66, width: 131, bgcolor: transparent"]
Policy Type[/TD]
[TD="class: xl66, width: 70, bgcolor: transparent"]
Profit[/TD]
[TD="class: xl66, width: 165, bgcolor: transparent"]
Occurrence Freq[/TD]
[TD="class: xl66, width: 66, bgcolor: transparent, align: right"]
1[/TD]
[TD="class: xl66, width: 64, bgcolor: transparent, align: right"]
2[/TD]
[TD="class: xl66, width: 64, bgcolor: transparent, align: right"]
3[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Jones[/TD]
[TD="class: xl67, bgcolor: transparent"]
Home[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
60[/TD]
[TD="class: xl66, bgcolor: transparent"]
Distinct Count[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
4[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
1[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
2[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Jones[/TD]
[TD="class: xl67, bgcolor: transparent"]
Motor[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
55[/TD]
[TD="class: xl66, bgcolor: transparent"]
Total[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
153[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
92[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
390[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Kane[/TD]
[TD="class: xl67, bgcolor: transparent"]
Home[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
45[/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[TD="class: xl65, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Able[/TD]
[TD="class: xl67, bgcolor: transparent"]
Home[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
33[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Kennedy[/TD]
[TD="class: xl67, bgcolor: transparent"]
Motor[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
30[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Jones[/TD]
[TD="class: xl67, bgcolor: transparent"]
Travel[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
50[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Webster[/TD]
[TD="class: xl67, bgcolor: transparent"]
Home[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
45[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Williams[/TD]
[TD="class: xl67, bgcolor: transparent"]
Motor[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
48[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Williams[/TD]
[TD="class: xl67, bgcolor: transparent"]
Home[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
44[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Smith[/TD]
[TD="class: xl67, bgcolor: transparent"]
Home[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
55[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Smith[/TD]
[TD="class: xl67, bgcolor: transparent"]
Motor[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
90[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: transparent"]
Smith[/TD]
[TD="class: xl67, bgcolor: transparent"]
Travel[/TD]
[TD="class: xl67, bgcolor: transparent, align: right"]
80[/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[TD="class: xl67, bgcolor: transparent"] [/TD]
[/TR]
</TBODY>[/TABLE]
E2, control+shift+enter, not just enter, and copy across:
Rich (BB code):
=SUM(IF(FREQUENCY(IF($A$2:$A$13<>"",MATCH($A$2:$A$13,$A$2:$A$13,0)),
ROW($A$2:$A$13)-ROW($A$2)+1)=E$1,1))
E3, control+shift+enter, not just enter, and copy across:
Rich (BB code):
=SUM(IF($A$2:$A$13<>"",IF(COUNTIF($A$2:$A$13,$A$2:$A$13)=E$1,$C$2:$C$13)))