Hi folks,
I need a formula column to aggregate the codes billed per customer visit (solution would look like E2:E10 below). Then later I can include the results in a PivotTable to see the combo frequency of codes billed at this store.
There is a large list of customer transactions. Each row includes a specific 4 character billing code that the customer was charged. Some customers may have many rows for a single visit (e.g. 6 or 7 distinct billing codes). Other customers may have just 1 row.
I've tried variations with FREQUENCY, SIGN and nested IF's with no luck. I'm sure there's a VBA solution using a For each loop, but I'm not there yet to figure out.
I've already prepped the data; it's filtered by customer name and a helper column is included to mark a "1" when it's a distinct customer visit (i.e. subsequent rows immediately below would be blank if it's the same customer/same day).
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Customer[/TD]
[TD]Date[/TD]
[TD]Distinct customer visit? (yes = 1)[/TD]
[TD]Code billed[/TD]
[TD]Codes billed per customer visit[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ABC[/TD]
[TD]Sep 01[/TD]
[TD]1[/TD]
[TD]499J[/TD]
[TD]499J, 550M[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]ABC[/TD]
[TD]Sep 01[/TD]
[TD][/TD]
[TD]550M[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]DEF[/TD]
[TD]Sep 02[/TD]
[TD]1[/TD]
[TD]425H[/TD]
[TD]425H[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]DEF[/TD]
[TD]Sep 05[/TD]
[TD]1[/TD]
[TD]690B[/TD]
[TD]690B, 701T, 499J, 880Q[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]DEF[/TD]
[TD]Sep 05[/TD]
[TD][/TD]
[TD]701T[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]DEF[/TD]
[TD]Sep 05[/TD]
[TD][/TD]
[TD]499J[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]DEF[/TD]
[TD]Sep 05[/TD]
[TD][/TD]
[TD]880Q[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]GHH[/TD]
[TD]Sep 08[/TD]
[TD]1[/TD]
[TD]701T[/TD]
[TD]701T, 499J[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]GHH[/TD]
[TD]Sep 08[/TD]
[TD][/TD]
[TD]499J[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Many thanks for reading through and your time!
James
I need a formula column to aggregate the codes billed per customer visit (solution would look like E2:E10 below). Then later I can include the results in a PivotTable to see the combo frequency of codes billed at this store.
There is a large list of customer transactions. Each row includes a specific 4 character billing code that the customer was charged. Some customers may have many rows for a single visit (e.g. 6 or 7 distinct billing codes). Other customers may have just 1 row.
I've tried variations with FREQUENCY, SIGN and nested IF's with no luck. I'm sure there's a VBA solution using a For each loop, but I'm not there yet to figure out.
I've already prepped the data; it's filtered by customer name and a helper column is included to mark a "1" when it's a distinct customer visit (i.e. subsequent rows immediately below would be blank if it's the same customer/same day).
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Customer[/TD]
[TD]Date[/TD]
[TD]Distinct customer visit? (yes = 1)[/TD]
[TD]Code billed[/TD]
[TD]Codes billed per customer visit[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ABC[/TD]
[TD]Sep 01[/TD]
[TD]1[/TD]
[TD]499J[/TD]
[TD]499J, 550M[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]ABC[/TD]
[TD]Sep 01[/TD]
[TD][/TD]
[TD]550M[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]DEF[/TD]
[TD]Sep 02[/TD]
[TD]1[/TD]
[TD]425H[/TD]
[TD]425H[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]DEF[/TD]
[TD]Sep 05[/TD]
[TD]1[/TD]
[TD]690B[/TD]
[TD]690B, 701T, 499J, 880Q[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]DEF[/TD]
[TD]Sep 05[/TD]
[TD][/TD]
[TD]701T[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]DEF[/TD]
[TD]Sep 05[/TD]
[TD][/TD]
[TD]499J[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]DEF[/TD]
[TD]Sep 05[/TD]
[TD][/TD]
[TD]880Q[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]GHH[/TD]
[TD]Sep 08[/TD]
[TD]1[/TD]
[TD]701T[/TD]
[TD]701T, 499J[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]GHH[/TD]
[TD]Sep 08[/TD]
[TD][/TD]
[TD]499J[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Many thanks for reading through and your time!
James