Thanks for the reply (except for the 'lazy' comment).
First, the column names are c1,c2,c3,c4,c5,c6, and c7 (didn't think that was needed to understand the problem)needed). The 'details' columns are c5,c6,c7 and the groups are C1, c2 and c3+c4. column c6 is numeric. I do not need any group...