Count specific value in range

ibmy

Board Regular
Joined
Mar 4, 2020
Messages
134
Office Version
  1. 2016
Platform
  1. Windows
Hi Mr Excel,

How to get result in Column Q & S?
Given number of range to check for Column Q in M , Column S in O
The Range to check in Column G.

Example : Cell O6 show 2 number of range , then check how many value < -0.6 in Column G and the result is 1 in Column S.
Same goes to Column M for Column Q

Sample from 300k row

sample.xlsb
GMOQS
1BCount -Count +< -0.6> 0.6
2
3-0.11
40
50.3
60.621
7-0.5
8-1.1
9-0.932
100.4
110.2
120.2
130.3
140.851
15-0.711
160
17111
Sheet1
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
edit : O6 is 2 and the range number are 0.3 & 0.6 , the result should be blank cell because > 0.6 should be start the count at 0.7

sorry for typo.
 
Upvote 0
To clarify:
Why is S6 "1", should the condition in fact be >=0.6?
Why is S17 "1", I thought Q17 should be "1" and S17 blank, for:
Given number of range to check for Column Q in M , Column S in O
 
Upvote 0
To clarify:
Why is S6 "1", should the condition in fact be >=0.6?
Why is S17 "1", I thought Q17 should be "1" and S17 blank, for:

Sorry, I entry wrong data

Yes you are right :

1) S6 should be blank cell
2) O17 should be 1, not M17 so S17 is 1

I update the data :
sample.xlsb
GMOQS
1BCount -Count +< -0.6> 0.6
2
3-0.11
40
50.3
60.62
7-0.5
8-1.1
9-0.932
100.4
110.2
120.2
130.3
140.851
15-0.711
160
17111
Sheet1
 
Upvote 0
Is this what you are after?

23 05 06.xlsm
GMNOPQRS
1BCount -Count +< -0.6> 0.6
2
3-0.110 
40  
50.3  
60.62 0
7-0.5  
8-1.1  
9-0.932 
100.4  
110.2  
120.2  
130.3  
140.85 1
15-0.711 
160  
1711 1
Count-+
Cell Formulas
RangeFormula
Q3:Q17Q3=IF(M3="","",COUNTIF(INDEX(G:G,ROW()-M3+1):G3,"<-0.6"))
S3:S17S3=IF(O3="","",COUNTIF(INDEX(G:G,ROW()-O3+1):G3,">0.6"))
 
Upvote 0
Solution

Forum statistics

Threads
1,223,937
Messages
6,175,525
Members
452,651
Latest member
wordsearch

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