• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help: Count and Sum with multiple criteria

Abhi Agarwal

New Member
Hi!

I have a data list (sample attached) where I want to calculate if the category in column F is mentioned in category list Column H

1. How many unique document numbers for that category
2. Sum of the values (Column D) for that category
3. The above needs to be calculated plant wise (Column E)

For e.g. for category ACOUSTIC the output would be

Category Accoustic
Count of unique document number (Plant A) - 2
Count of unique document number (Plant B) - 2
Value (Plant A) - 11230
Value (Plant B) - 4260


Please help

Abhi
 

Attachments

  • Calculation.xlsx
    9.2 KB · Views: 3
Last edited:
Hi, you could do it with a simple pivot table. Count distinct is available when loaded to a data model (Excel 2013 and up).
I also converted your data range also to a table. Adding new data to this table -> refresh pivot and calculations are done.
 

Attachments

  • Copy of Calculation.xlsx
    103.8 KB · Views: 1
Thanks Grah!

But if you see my excel sheet I want to calculate the output as illustrated in the attached excel only for the category in Column F if only it is present in category list Column H.

I have attached the sample excel sheet again with more values for clarity

Thanks
Abhi
 

Attachments

  • Calculation.xlsx
    9.5 KB · Views: 4
Hi,
I've added a simple "InList" column and filtered the pivot.
 

Attachments

  • Copy of Calculation.xlsx
    104.7 KB · Views: 1
Back
Top