Excel Grouping and Subtotalling using multiple criteria

HI Experts

Hope you can help

I have an invoice I need to subtotal using multiple criteria for the purpose of using for customs clearance in the USA

The problem I have is that Ive tried using the built in Grouping and Subtotalling functions however they don’t seem to give me the results I need.

Ideally, I need to the invoice to group by Columns A & B for both Country of Origin and Commodity Codes and with this data, subtotal the units and costs etc.

Ive tried various methods, including some VBA I found on a helpful site, but it does not seem to work.

I have attached the document in question – the Invoice sheet is the actual data with the Subtotal_Example sheet showing what, if possible, is required (or near to). I compiled this manually from the data so apologies if some of the values differ – it is just to highlight the kind of format I am desperate to achieve.

If you could help, I would be very appreciative

Thanks
J
EE_Help_SubtotallingInvoce.xlsx.xls
Jase AlexanderCompliance ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
have you tried pivot table which looks something likePivototable
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jase AlexanderCompliance ManagerAuthor Commented:
Hey

Thank you so much for your help

I didnt even occur to me to pivot the data

Just one thing - how did you format the colours for the rows? Was this manual or is there a formatting option?

Thanks
J
0
Saqib Husain, SyedEngineerCommented:
The formatting is manual
0
Jase AlexanderCompliance ManagerAuthor Commented:
Excellent Advice

Thank you again

J
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.