Hello,
I recorded a Macro using the Consolidation tool however when I run the Macro, it does not complete the task.
Here is what it looks like:
Sub Consolidate()
'
' Consolidate Macro
'
'
Sheets("Inventory Value Report").Select
Range("D1").Select
Selection.Consolidate Sources:=Array( _
"'C:\Users\ddep9969\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\U7MD7TOU\[Inventory Value Report 06062019 (002).xls]Inventory Value Report'!R1C1:R914C2" _
, _
"'C:\Users\ddep9969\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\U7MD7TOU\[Inventory Value Report 06062019 (002).xls]Inventory Value Report'!R1C1:R1200C2" _
), Function:=xlSum, TopRow:=True, LeftColumn:=True, CreateLinks:=False
End Sub
Can someone help me with creating a Module that locates the duplicates in column A and sums the values in column B:
[TABLE="width: 294"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]Item Number[/TD]
[TD]Quantity on Hand[/TD]
[/TR]
[TR]
[TD]3029891[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]5101078[/TD]
[TD="align: right"]1.08[/TD]
[/TR]
[TR]
[TD]7002294[/TD]
[TD="align: right"]0.5[/TD]
[/TR]
[TR]
[TD]7002294[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]0671677[/TD]
[TD="align: right"]0.75[/TD]
[/TR]
[TR]
[TD]5469259[/TD]
[TD="align: right"]1.5[/TD]
[/TR]
[TR]
[TD]2404135[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]2404135[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]1283456[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]7544737[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]1829748[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]2822383[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]2822383[/TD]
[TD="align: right"]1.25[/TD]
[/TR]
[TR]
[TD]8953028[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]6259477[/TD]
[TD="align: right"]1.58[/TD]
[/TR]
[TR]
[TD]4507214[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]2006559[/TD]
[TD="align: right"]1.35[/TD]
[/TR]
[TR]
[TD]4507234[/TD]
[TD="align: right"]0.5[/TD]
[/TR]
[TR]
[TD]4507263[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]5518529[/TD]
[TD="align: right"]0.83[/TD]
[/TR]
[TR]
[TD]4069870[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]1142381[/TD]
[TD="align: right"]0.67[/TD]
[/TR]
[TR]
[TD]4838704[/TD]
[TD="align: right"]0
[/TD]
[/TR]
</tbody>[/TABLE]
This list will vary in size so I would like for it to look for the last row with data and complete the task within that range.
Any help would greatly be appreciated!!
I recorded a Macro using the Consolidation tool however when I run the Macro, it does not complete the task.
Here is what it looks like:
Sub Consolidate()
'
' Consolidate Macro
'
'
Sheets("Inventory Value Report").Select
Range("D1").Select
Selection.Consolidate Sources:=Array( _
"'C:\Users\ddep9969\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\U7MD7TOU\[Inventory Value Report 06062019 (002).xls]Inventory Value Report'!R1C1:R914C2" _
, _
"'C:\Users\ddep9969\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\U7MD7TOU\[Inventory Value Report 06062019 (002).xls]Inventory Value Report'!R1C1:R1200C2" _
), Function:=xlSum, TopRow:=True, LeftColumn:=True, CreateLinks:=False
End Sub
Can someone help me with creating a Module that locates the duplicates in column A and sums the values in column B:
[TABLE="width: 294"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]Item Number[/TD]
[TD]Quantity on Hand[/TD]
[/TR]
[TR]
[TD]3029891[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]5101078[/TD]
[TD="align: right"]1.08[/TD]
[/TR]
[TR]
[TD]7002294[/TD]
[TD="align: right"]0.5[/TD]
[/TR]
[TR]
[TD]7002294[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]0671677[/TD]
[TD="align: right"]0.75[/TD]
[/TR]
[TR]
[TD]5469259[/TD]
[TD="align: right"]1.5[/TD]
[/TR]
[TR]
[TD]2404135[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]2404135[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]1283456[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]7544737[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]1829748[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]2822383[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]2822383[/TD]
[TD="align: right"]1.25[/TD]
[/TR]
[TR]
[TD]8953028[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]6259477[/TD]
[TD="align: right"]1.58[/TD]
[/TR]
[TR]
[TD]4507214[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]2006559[/TD]
[TD="align: right"]1.35[/TD]
[/TR]
[TR]
[TD]4507234[/TD]
[TD="align: right"]0.5[/TD]
[/TR]
[TR]
[TD]4507263[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]5518529[/TD]
[TD="align: right"]0.83[/TD]
[/TR]
[TR]
[TD]4069870[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]1142381[/TD]
[TD="align: right"]0.67[/TD]
[/TR]
[TR]
[TD]4838704[/TD]
[TD="align: right"]0
[/TD]
[/TR]
</tbody>[/TABLE]
This list will vary in size so I would like for it to look for the last row with data and complete the task within that range.
Any help would greatly be appreciated!!