Forum Discussion
Need help with Excel formula or VBA to list same data found with a sum of a related field
You can organize and summarize your Excel data by grouping unique "Object Codes" and calculating the total of related values using either a PivotTable or a combination of formulas like UNIQUE and SUMIF.
First, make sure your data is well-structured with clear headers such as "Object Code" and "% of Org Code."
If you're using a PivotTable, select your data range, go to the "Insert" tab, and choose "PivotTable." Place "Object Code" in the Rows area and "% of Org Code" in the Values area to automatically get a clean summary of each code with its corresponding total.
If you prefer using formulas (especially in Excel 365 or 2019), you can use the UNIQUE function to list all distinct Object Codes.
Then, next to each unique entry, apply a SUMIF formula to total up the values from the "% of Org Code" column that match each Object Code.
This method provides a dynamic and clear summary of how much is allocated per object category. Adjust ranges according to your actual data to ensure accurate results.