Please, could you help me on this.
Layout:
I have this matrix with a group (1-3) and 4 columns:
Group....: position 1-3
Column(A): position 5-7.
Column(B): position 8-10.
Column(C): position 11-13.
Column(D): position 14-16.
Column(A): position 5-7.
Column(B): position 8-10.
Column(C): position 11-13.
Column(D): position 14-16.
GRP.(A)(B)(C)(D)
Data:
AAA 111
AAA 111
AAA 222
AAA 333
AAA 331
AAA 441
AAA 442
AAA 442
BBB 123
BBB 301
BBB 301
BBB 404
CCC 888
AAA 111
AAA 222
AAA 333
AAA 331
AAA 441
AAA 442
AAA 442
BBB 123
BBB 301
BBB 301
BBB 404
CCC 888
output:
I need the number of occurrences of each column,
separated by position 1-3 (group), like this:
AAA 002 001 002 003
BBB 001 000 002 001
CCC 000 001 000 000
BBB 001 000 002 001
CCC 000 001 000 000
Thank you so much.