Hi perhaps some one can help with this?
I have an excel file that has a name colmun (this generated from other files using VBA). The name column just lists around 2000 names of buildings (duplicates included). Next to this column is the spend ascoicated with each building.
NAME SPEND
ddd 234
ddd 45
ds 67
df 87
fd 23
df 45
What I need is VBA that will sort the NAME field and then grab the total spend asociated with the (unique name). i.e
ddd 279
df 132
How can I do this ? I figure using offset to grab the value but I only want unique names with a total next to them - populated to a different 2 columns on the same sheet. The problem is we will never know the frequency of each name until they are generated and this frequency will be different each time.
Please advise a code snippet would be appareciated too I can make a button from this.
Thanks,
I have an excel file that has a name colmun (this generated from other files using VBA). The name column just lists around 2000 names of buildings (duplicates included). Next to this column is the spend ascoicated with each building.
NAME SPEND
ddd 234
ddd 45
ds 67
df 87
fd 23
df 45
What I need is VBA that will sort the NAME field and then grab the total spend asociated with the (unique name). i.e
ddd 279
df 132
How can I do this ? I figure using offset to grab the value but I only want unique names with a total next to them - populated to a different 2 columns on the same sheet. The problem is we will never know the frequency of each name until they are generated and this frequency will be different each time.
Please advise a code snippet would be appareciated too I can make a button from this.
Thanks,