I need help with a grouping formula in EXCEL

Hi Experts,
I have a spreadsheet with a weight column and class column in section 1.
In section 2, I want to list all the classes in section 1, but I want to group all the like classes and sum the weights of the like classes.
How can I do that with a formula?  I really don't want to use VBA, if I could possibly I would rather use a formula.  How can I accomplish this?

I have included an image below to help explain what it is I wish to accomplish.
Thank you very much in advance,
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You may use SUMIF to achieve this.
The syntax of the SUMIF formula is like this....


In the range provide the range reference of the cells which have class in them, in the criteria place the cell reference of the cell which contains Class (from your Section2 table) and in the sum_range, place the range reference of the cells from Section 1 which are to be summed based on the class.

If you are unable to implement this into your workbook, please upload a sample workbook so that we can suggest an exact formula with the exact range references.

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
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
in case you want to dynamically populate the result without using formula, you probably can try use pivot table as well
helpfinderIT ConsultantCommented:
I think in this case much more handy is to use Pivot table rather than formulas.
Just select table, go to Insert>Pivot table and put Class into Rows and Weight (sum) into Values. If you change your source table just right click on Pivot table and click Refresh.
See attached sample.
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
Microsoft Excel

From novice to tech pro — start learning today.