Home » excel » excel – Finding the total sum based a few criteria

# excel – Finding the total sum based a few criteria

Posted by: admin May 14, 2020 Leave a comment

Questions:

I am currently working with the following excel workbook:
Workbook 1

I wanted a feature where I can find the total number of doors that need fixing, but based on Brand and Model of the cars. For example in the workbook, there are 5 Honda Vios (Blue) that needs to fix 1 door, then 2 Honda Vios (Red) that needs to fix 2 doors. Therefore, is there any formulation (sumifs / countifs) that I can use so that I can easily find the total number of doors that need fixing?

How to&Answers:

In cell G2 add this formula:

``````=COUNTIF(E2:F2;"YES")*D2
``````

And drag it down.
This will count the number of doors on this row.

Then create a new table with the unique items and add the following formula which will sum all blue Honda Vios doors.

``````=SUMPRODUCT((A:A=M2)*(B:B=N2)*(C:C=O2)*G:G)
``````

If “ES” is included:

``````=(IF(ISNUMBER(FIND("ES",E2)),1,0)+IF(ISNUMBER(FIND("ES",F2)),1,0))*D2
``````

Regarding pivot table.
First make the table a official table by clickin on a cell in the table and go to insert -> table

Then again, click inside the table and go to insert -> Pivot table.
(To make it easier I added the pivot table on the same sheet)

Now set up the pivot as following:

When you add new items to your table, the pivot table must be refreshed.
Click on pivot table and go to Analyse -> refresh