Spreadsheet: 33670d1230222023-duplicates-from-a-range-and-then-counting-cut-list-macro
Sheet: Sheet1

 |  | EXAMPLE DATA
 |  | QTY | p1 | p2 | p3 | p4 | p5 | p6 | p7 | p8 | p9 | p10 | p11 | p12
 |  | 1 | top | shelf | top | rail | shelf | top | rail | shelf | top | rail | side | rail
 |  | 2 | tom | side | shelf | shelf | side | shelf | shelf | side | top | shelf | rail | rail
 |  | 3 | rail | rail | shelf | base | rail | shelf | base | rail | top | base | shelf | shelf
 |  | 2 | side | side | shelf | base | side | shelf | base | side | top | base | side | side
 |  | 2 | rail | rail | top | side | rail | top | three | rail | top | side | rail | rail
 |  | 2 | shelf | shelf | top | rail | shelf | top | rail | shelf | top | rail | shelf | shelf
 |  | 1 | side | side | shelf | shelf | side | top | shelf | side | shelf | shelf | side | side
 |  | 1 | rail | rail | shelf | base | rail | shelf | base | 0 | shelf | base | rail | rail
 |  | 3 | shelf | shelf | shelf | base | shelf | shelf | base | shelf | shelf | base | shelf | shelf
 |  | 1 | side | side | top | side |  | top | side | side | top | side | side | side
 |  | 5 | shelf | shelf | three | three | three | three | three | three | three | three | three | three
 |  | 1 |  |  | shelf | base | side | shelf | base | side | three | three | three | three
 |  | 1 |  |  | shelf | base | side | shelf | base | side | three | base | side | side
 |  | 1 |  |  | top | side | side | top | side | side | top | side | side | side
 |  | 1 |  |  | top | rail | rail | top | rail | rail | top | rail | rail | rail
 |  | 1 |  |  | top | shelf | shelf | shelf | shelf | shelf | top | shelf | shelf | shelf
 |  | 1 |  | side | top | base |  | shelf | base | side | top | base | side | side
 |  | 1 | side | side | top | base | side | shelf | base | side | top |  | side | three
 |  | 1 | side | side | top | base | rail | top | rail | rail | top | base | side | three
 |  | 1 | side | side | top | base | shelf | shelf | shelf | shelf | top |  | side | three
 |  | 1 | top | top | top | side |  | shelf | base | side | shelf | base | side | three
 |  | 1 | rail | rail | top | rail | side | shelf | base | side | shelf |  | rail | rail
 |  | 1 | rail | rail | shelf | shelf | rail | top | rail | rail | shelf | base | shelf | shelf
 |  | 1 | rail | rail | 0 | base | shelf | shelf | shelf | shelf | shelf | single | side | side
 |  | 1 | rail | side | 0 | base |  | shelf | base | side | side | base | side | side
 |  | 4 | rail | side | 0 | base | side | shelf | base | side | side |  | side | side
 |  | 1 | rail | side | 0 | base | rail | top | rail | rail | side | base | side | side
 |  | 1 | rail | side | 0 | side | shelf | shelf | shelf | shelf | side | side | side | side
 |  | 1 | rail | shelf | top | shelf | side | shelf | base | side | side |  | base | shelf
 |  | 1 | rail | side | top | base | rail | top | rail | rail | side | base | base | three
 |  | 1 | rail | side | top | base | shelf | shelf | shelf | shelf | side | base | base | three
 |  | 1 | rail | side | top | base |  | shelf | base | side | shelf | base | base | three
 |  | 1 | rail | side | top | base | side | shelf | base | side | shelf | base | base | three
 |  | 1 | rail | side | top | base | three | top | rail | rail | top | base | base | three
OUTPUT |  | 1 | rail | side | top | base | side | shelf | base | side | shelf | base | base | three
 |  | 1 | rail | side | top | base | three | top | rail | rail | top | rail | base | three
 |  |  |  |  |  |  | STOP
side (99) | shelf (91) | rail (69) | base (62) | top (53) | three (29) | 0 (27) | [NAME] (1) | single (1)