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.
 
1. What do you mean by "refresh" sheet? New data being added line by line, a brand new set of data. Do you have Manual Calculation turned on?
2. If there are more than 3 "breaks" how many counters do you want to see? What do you want to see if the last record is <8 or not colored?
3. Do you want the cells >8 counted or the cells that are colored counted?

I implore you to please give an exact example of what you want the spreadsheet to look like after you do a "refresh"?
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
How do you expect to get an accurate answer if you are using another perspective? Again, if you cannot get xl2bb to work, then make a small matrix (10 x 2) with the EXACT data in Column 1, and the EXACT result you want to see in Column

1. What do you mean by "refresh" sheet? New data being added line by line, a brand new set of data. Do you have Manual Calculation turned on?
2. If there are more than 3 "breaks" how many counters do you want to see? What do you want to see if the last record is <8 or not colored?
3. Do you want the cells >8 counted or the cells that are colored counted?

I implore you to please give an exact example of what you want the spreadsheet to look like after you do a "refresh"?
Just a short info what im doing, im using excel to export data from historian server..it is not live data .. i need to refresh excel sheet from time to time to get the data history.
in attached file there was a time and on the top is the counter..
Attached example sheet was opened at 0:24H and the counter could see on top...

sorry sir this is the last, even me im tired of this :) thanks for the inputs Untitled5.jpg
 
Upvote 0
Your task is not hard to accomplish, but you need to provide a better description of what you want.
The picture above has values less than 8 that are colored. Not sure why the time the file is refreshed is so critical, but that is your concern. But, if you want counts you need to give accurate expectations. You've received numerous examples of how to use countif. If you are focused on color you can query the cell color.

I asked to give a small matrix (10 x 2), why send another confusing photograph? anyway, best wishes.
 
Upvote 0
So, you only want a count of the LAST records in the column that are "Above 8" or "Colored"?
=-------- But, you have values less than 8 that are colored ------ please explain what you want counted?

As far as the refresh, most calculations will occur automatically. You would probably have to update formula ranges. when you add new data.
 
Upvote 0
So, you only want a count of the LAST records in the column that are "Above 8" or "Colored"?
=-------- But, you have values less than 8 that are colored ------ please explain what you want counted?

As far as the refresh, most calculations will occur automatically. You would probably have to update formula ranges. when you add new data.
coloured sir
 
Upvote 0
I looked into getting the background color as a data element to use to compare cells. But, I could not find that.
What are the data conditions that cause you to highlight the cell with a color? I also, am not sure how to create a formula that looks backwards from the last value in the column without a lot of recursion (LAMBDA functions - which I don't think is available in Excel 2019).

I just had a thought, MAYBE the last "FALSE" condition in a column could be located, and the number of that could be subtracted from the total column count to get the count.
 
Upvote 0
I looked into getting the background color as a data element to use to compare cells. But, I could not find that.
What are the data conditions that cause you to highlight the cell with a color? I also, am not sure how to create a formula that looks backwards from the last value in the column without a lot of recursion (LAMBDA functions - which I don't think is available in Excel 2019).

I just had a thought, MAYBE the last "FALSE" condition in a column could be located, and the number of that could be subtracted from the total column count to get the count.
its just a conditional formatting.. the counter were manual counting..i just made that for illustration only
 
Upvote 0
Well, if you are arbitrarily selecting cells to fill, I don't think a formula will always work for you. But, if it is indeed conditional.... what are your conditional formatting rules... those would be the rules to put in the formula!!!!

But, I was successful in getting it to work based on counting the last consective records greater than 8:

Mr Excel Questions.xlsx
ABCDEFGH
3TIME\COUNT3.001.002.001.000.000.002.00
400:00:018.027.968.327.838.158.018.33
500:00:027.628.177.998.327.548.187.89
600:00:037.558.488.187.857.777.998.13
700:00:047.998.228.338.018.297.948.09
800:00:057.917.997.977.658.308.298.02
900:00:068.387.627.678.268.198.377.74
1000:00:077.878.207.788.477.648.487.55
1100:00:088.008.287.608.158.508.217.62
1200:00:098.017.848.057.737.998.048.23
1300:00:108.258.298.408.177.637.918.44
COUNTIF
Cell Formulas
RangeFormula
B3:H3B3=ROWS(B4:B13)-MAX((ROW(B4:B13)-MIN(ROW(B4:B13))+1)*(B4:B13<8))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B4:H13Expression=B4>=8textNO
 
Last edited:
Upvote 0
Well, if you are arbitrarily selecting cells to fill, I don't think a formula will always work for you. But, if it is indeed conditional.... what are your conditional formatting rules... those would be the rules to put in the formula!!!!

But, I was successful in getting it to work based on counting the last consective records greater than 8:

Mr Excel Questions.xlsx
ABCDEFGH
3TIME\COUNT3.001.002.001.000.000.002.00
400:00:018.027.968.327.838.158.018.33
500:00:027.628.177.998.327.548.187.89
600:00:037.558.488.187.857.777.998.13
700:00:047.998.228.338.018.297.948.09
800:00:057.917.997.977.658.308.298.02
900:00:068.387.627.678.268.198.377.74
1000:00:077.878.207.788.477.648.487.55
1100:00:088.008.287.608.158.508.217.62
1200:00:098.017.848.057.737.998.048.23
1300:00:108.258.298.408.177.637.918.44
COUNTIF
Cell Formulas
RangeFormula
B3:H3B3=ROWS(B4:B13)-MAX((ROW(B4:B13)-MIN(ROW(B4:B13))+1)*(B4:B13<8))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B4:H13Expression=B4>=8textNO
Oh man..! this is exactly what i need...sir awoohaw thank you it works.....thank you for the time you spent just to give me an answer...i really really appreciate it...thank you also peter for the input.....you guys are amazing thank you again....
 
Upvote 0
You are welcome. I enjoyed the challenge.
Please get xl2bb for future questions.
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,215,634
Messages
6,125,934
Members
449,274
Latest member
mrcsbenson

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