Countif work Seperately Countifs doesn't

Schoots

New Member
Joined
Apr 12, 2016
Messages
10
Hello,

I'm having some troubles working with the COUNTIFS formula gathering information from the pivot table shown below. (it is actually larger but the idea is the same)

SupplierNr.
Descrption
Number
Problem
R00000162
ior 1503104. GEEN THT VERKEERDE MAAT SLECHT
M150830
03-KWALITE
R00000162
Een SO2 resultaat voldoet niet aan de EU-normM160606
01-VEILIG
R00000162glas in pinda's. 1409210. reactie van BelfrudisM14132401-VEILIG
R00000162steentje in pinda's. lot 15-28, tht 02/2016.M15093201-VEILIG
R00000162teveel SO2 in rozijnen. Belfrudis klacht verstuurdM14070001-VEILIG
R00000173teveel Chloraat in sample. Berrico klachtM16003001-VEILIG
R0000020406-05 Hanos order niet geleverd op afgesproken dagM15045507-LOGISTI
R000002041 emmer schade Kaashuis Dorestad Wijk bij DuurstedM16057707-LOGISTI
R000002042/3 juni te laat bij Rene Tiel om te ladenM15054807-LOGISTI

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

I need to be able to count for each SupplierNr. in the first collumn how many times a problem occurs.
So for R00000162 and 03-KWALITE that would be 1, for R00000162 and 01-VEILIG that would be 4 etc.

The easy way to do this is by making use of the COUNTIFS formula but this does not seem to work although the two seperate COUNTIF formulas do. and that is what i cannot seem to understand.

=countif(A1:A1000,R00000162) Works
=countif(D1:D1000,"03-LOGISTI") Works

=countifs(.... Doesn't work.

How is this possible and how can this be avoided? either with COUNTIFS or another (Array)formula

thanks in advance
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
COUNTIFS should work - what exactly is happening when you use it?

You could of course simply create another pivot table to count for you.
 
Upvote 0
SupplierNr.DescrptionNumberProblem
R00000162ior 1503104. GEEN THT VERKEERDE MAAT SLECHTM15083003-KWALITE
R00000162Een SO2 resultaat voldoet niet aan de EU-normM16060601-VEILIG
R00000162glas in pinda's. 1409210. reactie van BelfrudisM14132401-VEILIG
R00000162steentje in pinda's. lot 15-28, tht 02/2016.M15093201-VEILIG
R00000162teveel SO2 in rozijnen. Belfrudis klacht verstuurdM14070001-VEILIG
R00000173teveel Chloraat in sample. Berrico klachtM16003001-VEILIG
R0000020406-05 Hanos order niet geleverd op afgesproken dagM15045507-LOGISTI
R000002041 emmer schade Kaashuis Dorestad Wijk bij DuurstedM16057707-LOGISTI
R000002042/3 juni te laat bij Rene Tiel om te ladenM15054807-LOGISTI
Count of ProblemProblem
SupplierNr.01-VEILIG03-KWALITE07-LOGISTIGrand Total
R0000016241 5
R0000017311
R00000204 33
Grand Total5139
another pivot table on the pivot table output ?

<colgroup><col><col><col><col span="3"><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0
=COUNTIFS(A:A,"R00000162",D:D,"03-KWALITE")

=COUNTIFS(A:A,"R00000162",D:D,"01-VEILIG")

should work, but it's better that you apply these formulas on the source data or settle the matter entitely with a pivot approach.
 
Upvote 0
I also found it very strange that COUNTIFS would not work.
When i enter the formula i get a #VALUE! error.

The thing is that i do not want the end users of the worksheet to see the pivot table, they will be able to input the SupplierNr. and than get an overview which amongst other information includes the amount each problem arrised.

I did however not thought of just simply organizing the Pivot table in a different way which would, in combination with INDEX MATCH also give me the desired result.

Once again this forum has saved me!
Thank you all for the help.
 
Upvote 0
Gathering the information as described above would cause troubles when filtering the Pivot table on certain Dates.
Instead i've now used GETPIVOTDATA to get my desired results.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,527
Messages
6,125,337
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top