投稿/コメントを表示します。

連想配列で共通キーに対する複数データの合計値を算出するために連想配列の配列を定義してみました。
もっと良いやり方があるとは思いますが、うまく動いたのでご報告します。
Public Sub Dic_Closs_Shukei()

    Dim Dic(2) As Object  '連想配列の配列を定義
    Set Dic(0) = CreateObject("Scripting.Dictionary")
    Set Dic(1) = CreateObject("Scripting.Dictionary")
    Set Dic(2) = CreateObject("Scripting.Dictionary")

    Dim Product As String '連想配列の配列共通キー
    Dim Cnt As Long       '連想配列カウンター
    
    With Worksheets("抽出データ")
        For Cnt = 2 To .Range("A" & .Rows.Count).End(xlUp).Row
            Product = Trim(Left$(.Cells(Cnt, "A").Value, 7))
            'ブランク以外で、データフォーマット条件に合致するキーのデータを各配列に入れる
            If Product <> "" And Mid$(Product, 4, 1) = "-" Then
                If Dic(0).Exists(Product) Then
                    '2回目以降に見つかった場合
                    Dic(0).Item(Product) = Dic(0).Item(Product) + .Range("G" & Cnt).Value
                    Dic(1).Item(Product) = Dic(1).Item(Product) + .Range("C" & Cnt).Value
                    Dic(2).Item(Product) = Dic(2).Item(Product) + .Range("D" & Cnt).Value
                Else
                    '最初に見つかった場合
                    Dic(0).Add (Product), .Range("G" & Cnt).Value
                    Dic(1).Add (Product), .Range("C" & Cnt).Value
                    Dic(2).Add (Product), .Range("D" & Cnt).Value
                End If
            End If
        Next Cnt
    End With
    
    Dim Vkeys As Variant
    Vkeys = Dic(0).keys

    Dim CntforDic As Long '連想配列カウンター
    For CntforDic = LBound(Vkeys) To UBound(Vkeys)
        Range("A" & 4 + CntforDic).Value = Vkeys(CntforDic)
        Range("B" & 4 + CntforDic).Value = Dic(0).Item(Vkeys(CntforDic))
        Range("C" & 4 + CntforDic).Value = Dic(1).Item(Vkeys(CntforDic))
        Range("D" & 4 + CntforDic).Value = Dic(2).Item(Vkeys(CntforDic))
    Next CntforDic
    
    Set Dic(0) = Nothing
    Set Dic(1) = Nothing
    Set Dic(2) = Nothing

End Sub

2018/07/28 15:50