Sugiro criar uma Tabela Dinâmica com RecordMacro - resultados para mim conforme abaixo:
Sub Macro1()
Columns("A:B").Select
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R1C1:R1048576C2", Version:=xlPivotTableVersion12).CreatePivotTable _
TableDestination:="Sheet1!R1C4", TableName:="PivotTable2", DefaultVersion _
:=xlPivotTableVersion12
Sheets("Sheet1").Select
Cells(1, 4).Select
ActiveWorkbook.ShowPivotTableFieldList = True
With ActiveSheet.PivotTables("PivotTable2").PivotFields("equipment")
.Orientation = xlColumnField
.Position = 1
End With
With ActiveSheet.PivotTables("PivotTable2").PivotFields("customer_id")
.Orientation = xlRowField
.Position = 1
End With
ActiveSheet.PivotTables("PivotTable2").AddDataField ActiveSheet.PivotTables( _
"PivotTable2").PivotFields("equipment"), "Count of equipment", xlCount
End Sub