Excel VBA :Find The Sum Of Unique Values In A Range

Excel VBA Get Sum Of Unique Values

excel find unique values

In this study, we have worksheet that it has 9 columns .

We created  an Excel VBA code to sum the values of unique elements in column “B”. Ago we listed items in column “B” as unique values  into column “K” . Later  we entered the total of these items into column “L”.

We used the following VBA codes , to find unique values in column B and to write into column K :
Columns(“B:B”).AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Columns( _
“B:B”), CopyToRange:=Range(“‘Example1’!K1”), Unique:=True

For this purpose we created different two macros.

📥 Read more and download sample workbook

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.