Merge duplicate data across different columns and return sum of its qty

StarG

New Member
Joined
Nov 5, 2018
Messages
2
I have data being entered into non-adjacent columns that I want to merge, sum then remove the duplicated name. I do not have a master floor type list to query as there are over 50k types. Example, Floor Tile. There are potentially 5 different floor tile types being entered per row (house) and I need to be able to query all columns and produce a single total qty for the material on a separate sheet for purchasing to order from.

EX Data Entered:
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="class: grid, width: 129"]
<tbody>[TR]
[TD="width: 129"]Floor Tile 1[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD="class: xl69, width: 89"] FT Qty 1 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD="class: xl68, width: 129"]Floor Tile 2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD="class: xl69, width: 89"] FT Qty 2 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD="class: xl68, width: 129"]Floor Tile 3[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD="class: xl69, width: 89"] FT Qty 3 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD="class: xl68, width: 129"]Floor Tile 4[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD="class: xl69, width: 89"] FT Qty 4 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD="class: xl69, width: 89"]Floor Tile 5[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD="class: xl69, width: 89"] FT Qty 5 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]CEBOTHUES18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,400.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]CETEXBEIG18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,100.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]PNWOOSTUC836[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,600.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]FLFORMYST624[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,400.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]ALALABLAN117[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 2,100.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]CETEXBEIG18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,200.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]FLFORMYST624[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,400.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]MZARTAVOR20[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 150.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]CETEXBEIG18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,200.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]CETEXHUES18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,900.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]EGCLAIVOR1224[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 2,400.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]LAPOSBLAN21[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 150.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]CEORLHUES18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,500.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]EGMARWALN624[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 200.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]EGMARGREY624[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 150.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]CEBOTHUES18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 1,100.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]ALBOSNOCE17[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 50.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]RNPRICESA20[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1,200.00
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]PNWOOSTUC836[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]200.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]LAEQUSAGE18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 89"]
<tbody>[TR]
[TD] 100.00 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]FLFORMYST624[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1,200.00[/TD]
[TD]CETEXBEIG18[/TD]
[TD]150.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Example Final Report
[TABLE="class: outer_border, width: 250"]
<tbody>[TR]
[TD]CEBOTHUES18[/TD]
[TD]2,500.00[/TD]
[/TR]
[TR]
[TD]CETEXBEIG18[/TD]
[TD]3,650.00[/TD]
[/TR]
[TR]
[TD]PNWOOSTUC836[/TD]
[TD]1,800.00[/TD]
[/TR]
[TR]
[TD]FLFORMYST624[/TD]
[TD]4,000.00[/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]ALALABLAN117[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2,100.00 [/TD]
[/TR]
[TR]
[TD]MZARTAVOR20[/TD]
[TD]150.00[/TD]
[/TR]
[TR]
[TD]EGCLAIVOR1224[/TD]
[TD]2,400.00[/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]LAPOSBLAN21[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]150
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 129"]
<tbody>[TR]
[TD]CEORLHUES18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1,500.00[/TD]
[/TR]
</tbody>[/TABLE]

HELP!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi & welcome to MrExcel.
Are you interested in a VBA approach?
Also if the columns are not adjacent, which columns are your data in?
 
Upvote 0
I am interested in ANYTHING that will work. :)

The data is in all 10 columns but split (as shown) by each type then qty.

EX:
Tile Type 1 = Column A Qty for Type 1 = Column B
Tile Type 2 = Column C Oty for Type 2 = Column D
Tile Type 3 = Column E Qty for Type 3 = Column F

I need to merge all similar Tile Types, return the sum, and display in an easy to read table.
 
Upvote 0
In that case try this
Code:
Sub AddValues()
   Dim Cl As Range
   Dim UsdRws As Long
   
   UsdRws = Range("A" & Rows.Count).End(xlUp).Row
   With CreateObject("scripting.dictionary")
      For Each Cl In Intersect(Rows("2:" & UsdRws), Range("A:A,C:C,E:E,G:G,I:I"))
         If Cl.Value <> "" Then .Item(Cl.Value) = .Item(Cl.Value) + Cl.Offset(, 1).Value
      Next Cl
      Range("A" & UsdRws + 10).Resize(.Count).Value = Application.Transpose(.Keys)
      Range("B" & UsdRws + 10).Resize(.Count).Value = Application.Transpose(.Items)
   End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top