I just cannot get my head around looping.
But I am trying to add all of Column A's, dependant on unique values in Column B
Any ideas please.
A B
Total Country
3 australia
3 australia
4 australia
2 Canada
2 Finland
2 Canada
3 Norway
3 ttxxyyzz
3 australia
4 Norway
4 australia
5 Finland
5 Italy
5 Italy
10 Finland
Result
A B
Grand Total Country
17 australia
4 Canada
17 Finland
7 Norway
3 ttxxyyzz
10 Italy
I can sort column B into unique values
Range("B2:B16").Select
Selection.Copy
Range("E2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Range("$E$2:$E$16").RemoveDuplicates Columns:=1, Header:=xlNo
But I am trying to add all of Column A's, dependant on unique values in Column B
Any ideas please.
A B
Total Country
3 australia
3 australia
4 australia
2 Canada
2 Finland
2 Canada
3 Norway
3 ttxxyyzz
3 australia
4 Norway
4 australia
5 Finland
5 Italy
5 Italy
10 Finland
Result
A B
Grand Total Country
17 australia
4 Canada
17 Finland
7 Norway
3 ttxxyyzz
10 Italy
I can sort column B into unique values
Range("B2:B16").Select
Selection.Copy
Range("E2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Range("$E$2:$E$16").RemoveDuplicates Columns:=1, Header:=xlNo