[英]Collecting comma separated data in a single cell
I have an excel table which stores results from a questionnaire. 我有一个excel表,用于存储问卷调查的结果。 It includes a column where the responder includes multiple responses.
它包括一列,其中响应者包括多个响应。 I want to treat each response as a separate data point:
我想将每个响应视为一个单独的数据点:
Favourite Colour | Age |
-------------------------
Blue, Black | 12 |
Red, Green, Blue | 11 |
Orange | 12 |
Black, Blue, Red | 13 |
Red, Black | 11 |
...
Which would return: 哪个会返回:
Blue: 3
Black: 3
Red: 3
Green: 1
Orange: 1
Even better: 更好的是:
12 - Black: 1
- Blue: 1
- Orange:1
11 - Red: 2
- Green: 1
...
And I would hopefully be able to put this in a graph. 我希望能够将其放在图表中。
I've done some reading online and come across a LookUp
command or LookUpV
but am not sure about them so I though I would post a question. 我已经完成一些在线阅读,遇到过
LookUp
命令或LookUpV
但是不确定它们是否正确,因此尽管我会提出一个问题。
Hopefully I made my point clear enough. 希望我的观点足够清楚。
Assuming the table you give is in A1:B6 (with headers in row 1), and that you put eg "Blue" in D2, enter this formula in E2: 假设您提供的表在A1:B6中(标题在第1行中),并且您在D2中放置了例如“ Blue”,则在E2中输入以下公式:
=SUMPRODUCT(LEN($A$2:$A$6)-LEN(SUBSTITUTE($A$2:$A$6,D2,"")))/LEN(D2) = SUMPRODUCT(LEN($ A $ 2:$ A $ 6)-LEN(SUBSTITUTE($ A $ 2:$ A $ 6,D2,“”)))/ LEN(D2)
This can then be copied down to give similar results for colours in D3, D4, etc. 然后可以将其复制下来,以得到D3,D4等颜色的相似结果。
Regards 问候
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.