What I need is really simple. for instance:
Br 56
Bc 6
Bt 20
Br 23
bc 15
I want these duplicate bc/br/bt consolidate and sum their numbers This is the part of code I wrote. However it keeps giving me "application-defined or object- defined error". Can anybody tell what is the problem?
Sub lo()
Dim sr As Variant
Range("a1", Range("a1").End(xlDown).End(xlToRight)).Select
Set sr = Selection
Range("n1").Consolidate Sources:=sr,
_Function:=xlSum,TopRow:=False, LeftColumn:=True,
_CreateLinks:=False
End Sub