Badly Needed community help

Veltrex

New Member
Joined
Jan 22, 2023
Messages
13
Office Version
  1. 2019
Platform
  1. Windows
How do i count cell values in range that are continuously

Example: Column A was set to count only values more than 8.0. From #1-5 it would count 5, then #6&7 not included, then at number 8 counting start again as 1.
1. 8.1
2. 8.2
3. 8.3
4. 8.4
5. 8.6
6. 7.8
7. 7.7
8. 8.1
9. 8.2
10. 8.3
Guys can you help me what kind of formula should i use.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Please get the xl2bb tool from the link above to post your samples.
here is a solution which is assuming the numbers are values and not text:

Some Mr Excel Questions.xlsx
AB
18.18
28.2
38.3
48.4
58.6
67.8
77.7
88.1
98.2
108.3
Sheet1
Cell Formulas
RangeFormula
B1B1=COUNTIF(A1:A10,">"&8)
 
Upvote 0
Welcome to the MrExcel board!

Is one of theses what you are after?

23 01 23.xlsm
ABC
1NumGroup Count 1Group Count 2
28.151
38.252
48.353
58.454
68.655
77.8  
87.7  
98.131
108.232
118.333
12
Above 8
Cell Formulas
RangeFormula
B2:B11B2=IF(A2>8,IF(N(A1)>8,B1,FIND(0,CONCAT(IF(A2:A$19>8,1,0),0))-1),"")
C2:C11C2=IF(A2>8,N(C1)+1,"")
 
Upvote 0
or maybe this?
Some Mr Excel Questions.xlsx
AB
1
28.11
38.22
48.33
58.44
68.65
77.8 
87.7 
98.11
108.22
118.33
COUNTIF
Cell Formulas
RangeFormula
B2:B11B2=IF(A2>8,IF(N(B1)=0,1,N(B1)+1),"")
 
Upvote 0
I duplicated what was above, so please ignore.
 
Upvote 0
I duplicated what was above, so please ignore.
You've really got an extra bit in there that doesn't add anything. After all, if N(B1)=0 the red part would give 1 - but the blue part would do that anyway so the red part could be left out (which is what my column C formula does :))

=IF(A2>8,IF(N(B1)=0,1,N(B1)+1),"")
 
Upvote 0
Please get the xl2bb tool from the link above to post your samples.
here is a solution which is assuming the numbers are values and not text:

Some Mr Excel Questions.xlsx
AB
18.18
28.2
38.3
48.4
58.6
67.8
77.7
88.1
98.2
108.3
Sheet1
Cell Formulas
RangeFormula
B1B1=COUNTIF(A1:A10,">"&8)
Thank you awoohaw for the reply.. really appreciate it. But my

thank you guys for the effort. Sorry my english is bad. English is not my mother tongue. What i wanted to be is there is one cell that will count every cell value rhat has continuously more than 8 without breaking inbetween. The counter will reset once the value go below 8 and start counting again if there is cell value morethan 8.
Again thank you to your time for this..
 
Last edited by a moderator:
Upvote 0
What i wanted to be is there is one cell that will count every cell value rhat has continuously more than 8 without breaking inbetween.
Try this then. If this is still not what you want then please post the sample data and the expected result(s) with XL2BB so that we don't have to keep guessing what it is you want. ;)

23 01 23.xlsm
AB
1NumGroup Count
28.1 
38.2 
48.3 
58.4 
68.65
77.8 
87.7 
98.1 
108.2 
118.33
12
Above 8
Cell Formulas
RangeFormula
B2:B11B2=IF(AND(A2>8,A3<=8),COUNTIF(A$1:A2,">8")-SUM(B$1:B1),"")
 
Upvote 0
Welcome to the MrExcel board!

Is one of theses what you are after?

23 01 23.xlsm
ABC
1NumGroup Count 1Group Count 2
28.151
38.252
48.353
58.454
68.655
77.8  
87.7  
98.131
108.232
118.333
12
Above 8
Cell Formulas
RangeFormula
B2:B11B2=IF(A2>8,IF(N(A1)>8,B1,FIND(0,CONCAT(IF(A2:A$19>8,1,0),0))-1),"")
C2:C11C2=IF(A2>8,N(C1)+1,"")
Thank you sir.. struggling to install XL2bb for some reason. what i need is (please check the photo) one cell only that will count the cell values that has color. Its like A4:A8 the counter cell A1 will count as 5 because the cells has color. Counter cell A1 will reset back to zero because A9 has no color, counter cell A1 again count as 1 since A10 has color, counter again reset to zero since A11 has no color and start counting again because A12:A25 cell has color so on and so fort.

thank you in advance...

Please get the xl2bb tool from the link above to post your samples.
here is a solution which is assuming the numbers are values and not text:

Some Mr Excel Questions.xlsx
AB
18.18
28.2
38.3
48.4
58.6
67.8
77.7
88.1
98.2
108.3
Sheet1
Cell Formulas
RangeFormula
B1B1=COUNTIF(A1:A10,">"&8)
Untitled5.jpg
 
Upvote 0
Thank you sir.. struggling to install XL2bb for some reason. what i need is (please check the photo) one cell only that will count the cell values that has color. Its like A4:A8 the counter cell A1 will count as 5 because the cells has color. Counter cell A1 will reset back to zero because A9 has no color, counter cell A1 again count as 1 since A10 has color, counter again reset to zero since A11 has no color and start counting again because A12:A25 cell has color so on and so fort.

thank you in advance...


View attachment 83532
I think @Peter_SSs answered what you want in thread #8.
Here is his solution again:
WorkBook1.xlsx
AB
1NumGroup Count
28.1 
38.2 
48.3 
58.4 
68.65
77.8 
87.7 
98.1 
108.2 
118.33
Sheet1
Cell Formulas
RangeFormula
B2:B11B2=IF(AND(A2>8,A3<=8),COUNTIF(A$1:A2,">8")-SUM(B$1:B1),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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