Unique Count with VBA

killorb1

New Member
Joined
Mar 22, 2015
Messages
4
Looking for a lesson and a solution using VBA. I have about 123 lines of part numbers, the first line always starts at F13 and never sure on when the last line will be. I need to sum each unique part number and then create a table showing the quantity of each unique part number found. Probably add the table to a new sheet within the workbook. The table headings will be Qty. and Part Number.

I have some knowledge about VBA but getting off the ground has always been the struggle. I really don't want the fish, I want to be taught how to fish.

Thank you
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
You are describing a Pivot Table. Why need the VBA?
 
Upvote 0
You are describing a Pivot Table. Why need the VBA?

The comment of SPILLER is correct.
If you select your data and create a Pivot dynamic, automatically you will have the sum of the quantities of the unique parts.

8110662cde71919f592139c7f51809f6.jpg
 
Upvote 0
There is other things that the spreadsheet is doing. And I understand I could do this without vba but I would like it to be a program and I could get some understanding of vba.
 
Upvote 0
So what do you need in VBA, the generation of the pivot table or just the counting of parts.
You can give examples of how your data is and how you want the result.
 
Upvote 0
What I am striving to accomplish in the future is looking at multiple worksheets that will have part numbers in a column/area and will total them up i.e. a bill of material and then inserting/building that BOM in to Visio. The first part is me just trying to get the rock of VBA moving in some direction, if I can understand what it takes to create the simple I maybe able to build on its foundation.

Your example is correct, the assumption as of now would be the quantity (Qty.) would always be one but I do have a column for the quantity.
 
Upvote 0
I do not understand, you did not answer my doubts, I still do not know what you want.
Also you have to give some examples.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,429
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top