Hi,
I badly need some help here...
I have an excel worksheet with 33 records and 15 fields. For each pair of records, I need to determine the number of fields in which they have an exact match of value (intercept) and the no. of fields when the each pair is in union. Let me give an example...
Record R1 has fields A, C, and D. The corresponding values of the fields are a7, c3 and d9. record R2 has fields A, B, D and E. Corresponding values of a7, b1, d4 and e6.
i.e. R1: {a7, c3, d9)
R2: {a7, b1, d9, e6}
R1 intercept R2 will be 2 (a7=a7 and d9=d9)
R1 union R2 will be 5 (a7, b1, c3, d9, e6)
The results should be tabulated in 2 symmetrical cross-tables (one for intercept and the other for union) with the rows and columns made up of the record IDs. The content of the cross-table will the intercept/union value.
I will be doing this for quite a bit of data later on, thus I tot it will be crazy to do it manually... but I have no idea as to how to begin. Can someone please give me some pseudo code and general guidance? Should I attach the code to a command button or can I create some kind of formula in the cells of the symmetrical table?
Thanks!!
I badly need some help here...
I have an excel worksheet with 33 records and 15 fields. For each pair of records, I need to determine the number of fields in which they have an exact match of value (intercept) and the no. of fields when the each pair is in union. Let me give an example...
Record R1 has fields A, C, and D. The corresponding values of the fields are a7, c3 and d9. record R2 has fields A, B, D and E. Corresponding values of a7, b1, d4 and e6.
i.e. R1: {a7, c3, d9)
R2: {a7, b1, d9, e6}
R1 intercept R2 will be 2 (a7=a7 and d9=d9)
R1 union R2 will be 5 (a7, b1, c3, d9, e6)
The results should be tabulated in 2 symmetrical cross-tables (one for intercept and the other for union) with the rows and columns made up of the record IDs. The content of the cross-table will the intercept/union value.
I will be doing this for quite a bit of data later on, thus I tot it will be crazy to do it manually... but I have no idea as to how to begin. Can someone please give me some pseudo code and general guidance? Should I attach the code to a command button or can I create some kind of formula in the cells of the symmetrical table?
Thanks!!