N
Novaloc
Hi All,
This is only a small part of the spreadsheet
I have a component Name in Column C2:C20 and quantity in Column D220.
ColumnC can contain many components of the same name.
I have managed with VBA code ( Thanks to Colo's Excel Junk Room) to put all
unique component names in ColumnC starting at C22.
What I can't seem to be able to do is sum the unique totals from D220 for
the unique names for Column D starting at D22
The code below works for individual Names. There are a possible 150 part
names so I reckon that there would be a way with a For... Each... routine or
a loop. But, I can't get either of them to produce the correct result.
Also there is no way of knowing what part name will be at what address
Can anyone help?
Dim cn
Dim tally
Dim Qty
For Each cn In myRange3
If cn = "6T2" Then
Qty = cn.Offset(0, 1)
tally = tally + a3
End If
Next
Range("D22").Value = tally
Thanks
Richard
This is only a small part of the spreadsheet
I have a component Name in Column C2:C20 and quantity in Column D220.
ColumnC can contain many components of the same name.
I have managed with VBA code ( Thanks to Colo's Excel Junk Room) to put all
unique component names in ColumnC starting at C22.
What I can't seem to be able to do is sum the unique totals from D220 for
the unique names for Column D starting at D22
The code below works for individual Names. There are a possible 150 part
names so I reckon that there would be a way with a For... Each... routine or
a loop. But, I can't get either of them to produce the correct result.
Also there is no way of knowing what part name will be at what address
Can anyone help?
Dim cn
Dim tally
Dim Qty
For Each cn In myRange3
If cn = "6T2" Then
Qty = cn.Offset(0, 1)
tally = tally + a3
End If
Next
Range("D22").Value = tally
Thanks
Richard