If you're saying the values in raw data are ordered by PO# (implied by sample) then:
'Raw Data'!C2
=IF(COUNTIF($A$2:$A2,$A2)=1,$B2,INDEX($C$1:$C1,MATCH($A2,$A$2:$A2))&","&$B2)
copied down
'Raw Data'!E1: Bucket [ie header value]
'Raw Data'!E2:
=LOOKUP($A2,$A$2:$C$20)
copied down
Revise the PT source to include column E and use this in your Pivot (rather than C).
The above means all is formula driven and dynamic though I would reiterate the above is based on assumption that data is sorted by PO#
(ie utilises binary search for optimisation)
Bookmarks