Sum frequency based on adjacent cell with separated by comma

DeanA1712

New Member
Joined
Jan 11, 2013
Messages
5
Hi Guys,

I download an excel file of survey answers on a monthly basis for a report.
Each line item is an unique entry.

For a particular questions (multiple select): example: Which fruits do you eat: A / B / C
It puts all the answers into 1 cell separated by commas. Example "A, C" or "A" or "A, B, C".

When I pivot and sum the frequency, it shows the it based on: "A, C" or "A" or "A, B, C".

Question: How can i sum the frequency based on the individual option:
A: 7
B: 11
C: 11

From:
[TABLE="class: grid, width: 500, align: center"]
<TBODY>[TR]
[TD]Fields[/TD]
[TD]frequency[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]A, B[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]A, B, C[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]A, C[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]B, C[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]1[/TD]
[/TR]
</TBODY>[/TABLE]


Caveat: there are more than 3 types of fields (A, B and C), they are text, some quite long.
Thank you for your time, i hope i was clear.

Cheers,
Dean
 
Hi Guys,

I download an excel file of survey answers on a monthly basis for a report.
Each line item is an unique entry.

For a particular questions (multiple select): example: Which fruits do you eat: A / B / C
It puts all the answers into 1 cell separated by commas. Example "A, C" or "A" or "A, B, C".

When I pivot and sum the frequency, it shows the it based on: "A, C" or "A" or "A, B, C".

Question: How can i sum the frequency based on the individual option:
A: 7
B: 11
C: 11

From:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Fields
[/TD]
[TD]frequency
[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]A, B
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]A, B, C
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]A, C
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]B
[/TD]
[TD]5
[/TD]
[/TR]
[TR]
[TD]B, C
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]C
[/TD]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]


Caveat: there are more than 3 types of fields (A, B and C), they are text, some quite long.
Thank you for your time, i hope i was clear.

Cheers,
Dean
[TABLE="width: 411"]
<colgroup><col style="width: 48pt;" width="64"> <col style="width: 75pt; mso-width-source: userset; mso-width-alt: 3555;" width="100"> <col style="width: 48pt;" span="6" width="64"> <tbody>[TR]
[TD="class: xl63, width: 64, bgcolor: white"]Fields[/TD]
[TD="class: xl63, width: 100, bgcolor: white"]frequency[/TD]
[TD="class: xl64, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl64, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl64, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl64, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl64, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl64, width: 64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]A[/TD]
[TD="class: xl63, width: 100, bgcolor: white"]1[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"]A[/TD]
[TD="class: xl64, bgcolor: transparent, align: right"]7[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]A, B[/TD]
[TD="class: xl63, width: 100, bgcolor: white"]2[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"]B[/TD]
[TD="class: xl64, bgcolor: transparent, align: right"]16[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]A, B, C[/TD]
[TD="class: xl63, width: 100, bgcolor: white"]3[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"]C[/TD]
[TD="class: xl64, bgcolor: transparent, align: right"]11[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]A, C[/TD]
[TD="class: xl63, width: 100, bgcolor: white"]1[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]B[/TD]
[TD="class: xl63, width: 100, bgcolor: white"]5[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]B, C[/TD]
[TD="class: xl63, width: 100, bgcolor: white"]6[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64, bgcolor: white"]C[/TD]
[TD="class: xl63, width: 100, bgcolor: white"]1[/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[TD="class: xl64, bgcolor: transparent"] [/TD]
[/TR]
</tbody>[/TABLE]


G2, copied down:

=SUMIF($A$2:$A$8,"*"&F2&"*",$B$2:$B$8)
 
Upvote 0

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