Test the code below, please.
Code Snippet
Sub getSubTotal()
Dim sRng As Range
Dim dRng As Range
Dim strFor As String
Dim PT As Range
'activate destination sheet
Worksheets("Sheet2").Activate
'clear the sheet
ActiveSheet.Cells.ClearContents
'set the source range
Set sRng = Worksheets("Sheet1").Range("a1").CurrentRegion.Columns(1)
'get the unique items
sRng.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("a1"), Unique:=True
'2th title
Range("b1") = sRng.Cells(1).Offset(0, 1)
'source data area
Set sRng = sRng.Offset(1, 0).Resize(sRng.Rows.Count - 1, 1)
'destination data area
Set dRng = Range([a2], [a2].End(xlDown))
'sum the subtotal usesing arrayformula to each item
For Each PT In dRng
strFor = "=sum((" & sRng.Worksheet.Name & "!" & sRng.Address(0, 0) & "=" & _
PT.Address(0, 0) & ") * " & sRng.Worksheet.Name & "!" & sRng.Offset(0, 1).Address(0, 0) & ")"
PT.Offset(0, 1).Value = Application.Evaluate(strFor)
Next
End Sub