You can put this array* formula in D2:
Adjust the ranges to suit your data (might be a bit slow with 18000 rows) then copy down as far as you think you need it. This will generate a list of unique items from column A.
*NOTE that an array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE) instead of the usual <Enter>.
Then you can put this formula in E2:
then copy that down, to get the totals for each unique item.
The attached file demonstrates this on your sample data.
Hope this helps.
Pete
Bookmarks