Counta and Countifs Ignore Formula

ozbeachbum

Board Regular
Joined
Jun 3, 2015
Messages
237
Office Version
  1. 2021
Platform
  1. Windows
Hi,
For L279 I need to calculate IF $D280:$D302 is >0 & L280:L302 is >0
then return the number of cells >0 in L280:L302 (3). Otherwise Zero.

For P279 I need to calculate IF $D280:$D302 is >0 & P280:P302 is >0
then return the number of cells >0 in P280:P302 (1). Otherwise Zero.

I have tried numerous combinations but just can't get a formula that will work for both locations.
Any help greatly appreciated.

241118 counta if ifs.xlsx
DEFGHIJKLMNOPQR
27903030403000300
280010SEKCBDASX01X005028507316622 | 88488573
281
282
283
284
285
286010SKCCBDASX01X0050285073 
287
288
289
290
291
292010SOLCBDASXF1X0050285073 
293
294
295
296
297
298000SYMCBDASXS1X0050285073 
299
300
301
302
303
304For L279 I need to calculate IF $D280:$D302 is >0 & L280:L302 is >0
305then return the number of cells >0 in L280:L302 (3). Otherwise Zero.
306
307For P279 I need to calculate IF $D280:$D302 is >0 & P280:P302 is >0
308then return the number of cells >0 in P280:P302 (1). Otherwise Zero.
Blank
Cell Formulas
RangeFormula
D279D279=COUNTA($D280:$D302)-COUNTIF($D280:$D302,0)
F279,R279,N279F279=COUNTIFS($D280:$D302,">0",F280:F302,"<>")
H279H279=COUNTA(H280:H302)
D280,D298,D292,D286D280='[01 REGISTER holding co.xlsx]Primary Entry'!D280
E280,G280,E298,G298,E292,G292,E286,G286E280='[01 REGISTER holding co.xlsx]Primary Entry'!J280
F280,F298,F292,F286F280='[01 REGISTER holding co.xlsx]Primary Entry'!P280
H280,H298,H292,H286H280='[01 REGISTER holding co.xlsx]Primary Entry'!N280
J280,J298,J292,J286J280='[01 REGISTER holding co.xlsx]Primary Entry'!H286
L279,P279L279=IF(COUNTA(L280:L296)-COUNTIF(L280:L296,0)=0,0,COUNTIFS($D280:$D296,">0",L280:L296,"<>"))
L280,L298,L292,L286L280=IF(K280=1,$R$25,"")
P280,P298,P292,P286P280=IF(O280=1,$R$35&" | "&$R$37,"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
P279Cell Value>0textYES
L279Cell Value>0textYES
H279Cell Value=1textYES
H279Cell Value=2textYES
H279Cell Value=3textYES
H279Cell Value=4textYES
H279Cell Value=7textYES
H279Cell Value=8textYES
R279,N279Cell Value>0textYES
F279Expression=F279<$D279textYES
F298Expression=AND(F298="TLS",D298=0)textYES
F298Expression=AND(F298="IAG",D298=0)textYES
F298Expression=AND(ISTEXT(F298),D298=0)textYES
F298Cell Value="TLS"textYES
F298Cell Value="IAG"textYES
F298Expression=ISTEXT(F298)textYES
F298Cell Value=0textYES
H298Cell Value="ASX"textNO
H298Cell Value="LSX"textYES
H298Cell Value=NZXtextYES
H298Cell Value="NYX"textYES
H298Cell Value=0textNO
F292Expression=AND(F292="TLS",D292=0)textYES
F292Expression=AND(F292="IAG",D292=0)textYES
F292Expression=AND(ISTEXT(F292),D292=0)textYES
F292Cell Value="TLS"textYES
F292Cell Value="IAG"textYES
F292Expression=ISTEXT(F292)textYES
F292Cell Value=0textYES
H292Cell Value="ASX"textNO
H292Cell Value="LSX"textYES
H292Cell Value=NZXtextYES
H292Cell Value="NYX"textYES
H292Cell Value=0textNO
F286Expression=AND(F286="TLS",D286=0)textYES
F286Expression=AND(F286="IAG",D286=0)textYES
F286Expression=AND(ISTEXT(F286),D286=0)textYES
F286Cell Value="TLS"textYES
F286Cell Value="IAG"textYES
F286Expression=ISTEXT(F286)textYES
F286Cell Value=0textYES
H286Cell Value="ASX"textNO
H286Cell Value="LSX"textYES
H286Cell Value=NZXtextYES
H286Cell Value="NYX"textYES
H286Cell Value=0textNO
F280Expression=AND(F280="TLS",D280=0)textYES
F280Expression=AND(F280="IAG",D280=0)textYES
F280Expression=AND(ISTEXT(F280),D280=0)textYES
F280Cell Value="TLS"textYES
F280Cell Value="IAG"textYES
F280Expression=ISTEXT(F280)textYES
F280Cell Value=0textYES
H280Cell Value="ASX"textNO
H280Cell Value="LSX"textYES
H280Cell Value=NZXtextYES
H280Cell Value="NYX"textYES
H280Cell Value=0textNO
N280,N286,N292,N298,R280,R286,R292,R298Expression=AND($D280=0,N280>0)textNO
L280,P280,L286,L292,L298,P286,P292,P298Expression=AND($D280=0,L280>0)textYES
L280,P280,L286,L292,L298,P286,P292,P298Cell Value>0textYES
J298Cell Value="S"textNO
J298Cell Value="T"textNO
J298Cell Value="F"textNO
J292Cell Value="S"textNO
J292Cell Value="T"textNO
J292Cell Value="F"textNO
J286Cell Value="S"textNO
J286Cell Value="T"textNO
J286Cell Value="F"textNO
J280Cell Value="S"textNO
J280Cell Value="T"textNO
J280Cell Value="F"textNO
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
For L279 I need to calculate IF $D280:$D302 is >0 & L280:L302 is >0
These are ranges. It doesn't make sense to say that a range is >0.
Also column L is text, not numeric, so it especially doesn't make sense to say that L280:L302 is >0.

Please give an example of data that would meet these conditions.
 
Upvote 0
Try this in L279 & copy it to P279
Excel Formula:
=COUNTIFS($D280:$D302,">0",L280:L302,"?*")
 
Upvote 0
Solution
These are ranges. It doesn't make sense to say that a range is >0.
Also column L is text, not numeric, so it especially doesn't make sense to say that L280:L302 is >0.

Please give an example of data that would meet these conditions.
Thanks apricate your comments and will look into it.
 
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