[TABLE="width: 294"]
<tbody>[TR]
[TD="class: xl64, width: 66, bgcolor: transparent"]
Qty[/TD]
[TD="class: xl64, width: 66, bgcolor: transparent"]
Length[/TD]
[TD="class: xl64, width: 66, bgcolor: transparent"]
Qty[/TD]
[TD="class: xl64, width: 66, bgcolor: transparent"]
Length[/TD]
[TD="class: xl64, width: 66, bgcolor: transparent"]
Qty[/TD]
[TD="class: xl64, width: 66, bgcolor: transparent"]
Length[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
3500[/TD]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
3000[/TD]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
980[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]
2[/TD]
[TD="class: xl65, bgcolor: transparent"]
3020[/TD]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
1000[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]
2[/TD]
[TD="class: xl65, bgcolor: transparent"]
3020[/TD]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
1000[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
2[/TD]
[TD="class: xl65, bgcolor: transparent"]
3500[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
1243[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"]
2[/TD]
[TD="class: xl65, bgcolor: transparent"]
2500[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
3500[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
7[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl66, bgcolor: transparent"]
Desired Result[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
4[/TD]
[TD="class: xl65, bgcolor: transparent"]
3500[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
3000[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
4[/TD]
[TD="class: xl65, bgcolor: transparent"]
3020[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
980[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
2[/TD]
[TD="class: xl65, bgcolor: transparent"]
1000[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
1[/TD]
[TD="class: xl65, bgcolor: transparent"]
1243[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: transparent"]
2[/TD]
[TD="class: xl65, bgcolor: transparent"]
2500[/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[TD="class: xl65, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
Add the following code for
ARRAYUNION function to your workbook, using Alt+F11.
Now define
LenghtData by means of Formulas | Name Manager as referring to:
Rich (BB code):
=arrayunion(Sheet1!$B$2:$B$7,Sheet1!$D$2:$D$4,Sheet1!$F$2:$F$6)
And define
Ivec as referring to:
Rich (BB code):
=ROW(INDIRECT("1:"&COLUMNS(LengthData)))
A11, just enter and copy down:
Rich (BB code):
=IF($B11="","",SUMIF($B$2:$F$7,$B11,$A$2:$E$6))
B11, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF(ROWS($B$11:B11)<=$A$9, INDEX(LengthData,
SMALL(IF(FREQUENCY(IF(LengthData<>"",
MATCH("~"&LengthData,LengthData&"",0)),Ivec),Ivec),
ROWS($B$11:B11))),"")
Addendum. See the workbook that implements the set up of above:
https://dl.dropboxusercontent.com/u/65698317/Dan5977 unque items of a multicolumn range.xlsm