Countifs and do not count zero

Leda Leong

New Member
Joined
Sep 25, 2017
Messages
11
Dear all,

as I need to find out the top 3 Remedy in the list item, it show PAINT, FIX AND 0...
but when it comes to zero, it will count a value for zero, but I would like to exclude 0 in my value data
can anybody help, thanks,

my calculation for Column No is =COUNTIFS(A:A,">"&TODAY()-1,F:F,$AC$2,G:G,AE2)

[TABLE="width: 175"]
<colgroup><col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"><col width="33" style="width: 25pt; mso-width-source: userset; mso-width-alt: 1206;"><col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"><col width="50" style="width: 38pt; mso-width-source: userset; mso-width-alt: 1828;"><tbody>[TR]
[TD="class: xl78, width: 75, bgcolor: yellow"]Problem[/TD]
[TD="class: xl77, width: 33, bgcolor: #E7E5E5"]No[/TD]
[TD="class: xl77, width: 75, bgcolor: #E7E5E5"]List [/TD]
[TD="class: xl77, width: 50, bgcolor: #E7E5E5"]No[/TD]
[/TR]
[TR]
[TD="class: xl79, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl80, bgcolor: transparent"]21[/TD]
[TD="class: xl79, bgcolor: transparent"]PAINT[/TD]
[TD="class: xl81, bgcolor: transparent"]16[/TD]
[/TR]
[TR]
[TD="class: xl79, bgcolor: transparent"] [/TD]
[TD="class: xl80, bgcolor: transparent"] [/TD]
[TD="class: xl79, bgcolor: transparent"]FIX[/TD]
[TD="class: xl81, bgcolor: transparent"]3[/TD]
[/TR]
[TR]
[TD="class: xl79, bgcolor: transparent"] [/TD]
[TD="class: xl80, bgcolor: transparent"] [/TD]
[TD="class: xl79, bgcolor: transparent, align: right"]0[/TD]
[TD="class: xl81, bgcolor: transparent"]1[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 366"]
<colgroup><col width="76" style="width: 57pt; mso-width-source: userset; mso-width-alt: 2779;"> <col width="67" style="width: 50pt; mso-width-source: userset; mso-width-alt: 2450;"> <col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"> <col width="97" style="width: 73pt; mso-width-source: userset; mso-width-alt: 3547;"> <col width="77" style="width: 58pt; mso-width-source: userset; mso-width-alt: 2816;"> <col width="96" style="width: 72pt; mso-width-source: userset; mso-width-alt: 3510;"> <tbody>[TR]
[TD="class: xl84, width: 76, bgcolor: #E7E5E5"]DATE[/TD]
[TD="class: xl84, width: 67, bgcolor: #E7E5E5"]J-Day[/TD]
[TD="class: xl84, width: 75, bgcolor: #E7E5E5"]MONTH[/TD]
[TD="class: xl84, width: 97, bgcolor: #E7E5E5"]Status 狀態[/TD]
[TD="class: xl83, width: 77, bgcolor: #E7E5E5"]Problem[/TD]
[TD="class: xl84, width: 96, bgcolor: #E7E5E5"]Remedy[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]DUPLICATE[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]0[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]FIX[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]ZR-OTHER[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]FIX[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINT[/TD]
[/TR]
[TR]
[TD="class: xl89, bgcolor: transparent"]27-Sep[/TD]
[TD="class: xl85, bgcolor: transparent"]270[/TD]
[TD="class: xl85, bgcolor: transparent"]9[/TD]
[TD="class: xl85, bgcolor: transparent"]COMP[/TD]
[TD="class: xl85, bgcolor: transparent"]PAINTP[/TD]
[TD="class: xl85, bgcolor: transparent"]FIX[/TD]
[/TR]
</tbody>[/TABLE]
 

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)
The simplest way seems to be to add another criterion to your COUNTIFS:
=COUNTIFS(A:A,">"&TODAY()-1,F:F,$AC$2,G:G,AE2,D:D,"COMP")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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