Attached below is a sample data.
The purpose is to create a table (shown below) which summarizes how often do two persons occur at the same time.
E.g.
Use "Rebecca" as an example.
Total count of "Rebeceaa" occurence in all invoices = 4.
For invoice number 4, "Wendy" and "Mary" also exist at the same time with "Rebecca".
So their occurrence frequency relative to "Rebecca" would be 1/4 (25%) and 1/4 (25%) respectively.
I would like to automate the above process ( fill-up the whole table ) via vba or any other way convenient and fast.
I get a large data set, >1000 data row. Manual calculation would be deadly.
Hope someone can help.
Thanks a lot!
The purpose is to create a table (shown below) which summarizes how often do two persons occur at the same time.
E.g.
Use "Rebecca" as an example.
Total count of "Rebeceaa" occurence in all invoices = 4.
For invoice number 4, "Wendy" and "Mary" also exist at the same time with "Rebecca".
So their occurrence frequency relative to "Rebecca" would be 1/4 (25%) and 1/4 (25%) respectively.
I would like to automate the above process ( fill-up the whole table ) via vba or any other way convenient and fast.
I get a large data set, >1000 data row. Manual calculation would be deadly.
Hope someone can help.
Excel 2012 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | Invoice | Name | Total Count | ||||||||||||
2 | 1 | Rebecca | Betty | 4 | |||||||||||
3 | 4 | Wendy | Ken | 1 | |||||||||||
4 | 4 | Rebecca | Mary | 3 | |||||||||||
5 | 4 | Mary | Philip | 2 | |||||||||||
6 | 5 | Mary | Rebecca | 4 | |||||||||||
7 | 10 | Betty | Susan | 1 | |||||||||||
8 | 10 | Betty | Thomas | 2 | |||||||||||
9 | 10 | Betty | Tom | 1 | |||||||||||
10 | 22 | Philip | Wendy | 1 | |||||||||||
11 | 24 | Rebecca | |||||||||||||
12 | 26 | Betty | Simultaneous Occurrence for same invoice (= ccurrence / total count ) | ||||||||||||
13 | 28 | Tom | Betty | Ken | Mary | Philip | Rebecca | Susan | Thomas | Tom | Wendy | ||||
14 | 28 | Susan | Betty | ||||||||||||
15 | 29 | Thomas | Ken | ||||||||||||
16 | 30 | Thomas | Mary | ||||||||||||
17 | 30 | Philip | Philip | ||||||||||||
18 | 36 | Ken | Rebecca | 25% | 100% | 25% | |||||||||
19 | 37 | Mary | Susan | ||||||||||||
20 | 41 | Rebecca | Thomas | ||||||||||||
21 | Tom | ||||||||||||||
22 | Wendy | ||||||||||||||
工作表3 |
Thanks a lot!