COUNTIF for multiple data types

investntrade

New Member
Joined
Jul 26, 2017
Messages
11
Office Version
  1. 2016
Hi,

I have data in excel which contains alphanumeric values like "NA", blanks and spaces, as well as numbers as percentage:
For example, I have the 17 values in a column which includes 3 percentage numbers, 11 NA and rest blank values:

[TABLE="width: 69"]
<colgroup><col></colgroup><tbody>[TR]
[TD="align: right"]2.37%[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]1.37%[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD="align: right"]-0.49%[/TD]
[/TR]
[TR]
[TD]NA[/TD]
[/TR]
[TR]
[TD]NA


[/TD]
[/TR]
</tbody>[/TABLE]


I want to get the count of only those cells whose values are less than a specific range. In the above example, say I want to count values which are greater than 1%. So I put the 1% value in cell B2, and then use the following formula:
=COUNTIF(K2:K88,">-$B$2")

Unfortunately, the above is returning all counts of NA (i.e. 11), as it seems that NA is being considered as greater than the number 1%.

Expected output should be the count of 2 (for value of 2.37% and 1.37%) in the whole range.

Can the experts please help in getting the right formula?

Thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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