Count Occurences of a Cell If It's Less Than

matthewlouis

Active Member
Joined
Mar 28, 2014
Messages
374
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
In my probability analysis spreadsheet, I have a single cell (E10) that contains a %. My goal is to create a counter where, on a mouse click, it will count the number of times cell E10 <=80%.

If I do 30 clicks, 40 clicks, just a simple set of iterations . . . I would like to see the cell count the times those clicks were less <=80%.

What would the formula look like for that?

Thanks in advance!
 
I will update the algo with what you just posted . . . I have saved it as a macro-enabled workbook. Same thing as .xlms ?

OK, now it's calculating and recording. However, I have to keep hitting Esc to get to calculate, i.e., I have to hit it 100 times. But it is counting now and my numbers are changing. But it is not automatic. But it's a lot better than what I had! Any way to make it automatic?
 

Attachments

  • Snip.png
    Snip.png
    65.8 KB · Views: 2
  • Snip 2.png
    Snip 2.png
    68.4 KB · Views: 3
Last edited:
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
macro-enabled is right.

When it runs, it should fill up the Immediate window, and this latest one will pester you with pop up messages counting up to 100. If that isn't happening, the macro isn't running.
 
Upvote 0
Get rid of the MSGBOX line - it will be less pesty.
 
Upvote 0
Solution
Get rid of the MSGBOX line - it will be less pesty.
Hmmmm, got rid of the MSGBOX line and it stopped calculating again. Went and put it back in and it's calculating. I just hit Esc 100 times and it calculates and counts. The Immdiate box looks great, it's full all the way to 100. I also noticed I cannpt have Excel in auto cal mode or it does have the pesky pop up messages. Manual only works an. So, it's working with the MSGBOX line just doesn't do it automatically.
 
Last edited:
Upvote 0
Yeah, I took MSG line out, put excel on autocalculate, hit the macro and no calculations again, just counts to 100.
 
Upvote 0
So if you type a number into any cell in your spreadsheet, does your random numbers change? Sometimes I hold delete on an empty cell and I watch all of the random numbers change in the spreadsheet. Is that happening? It's an oddity to me.
 
Upvote 0
So if you type a number into any cell in your spreadsheet, does your random numbers change? Sometimes I hold delete on an empty cell and I watch all of the random numbers change in the spreadsheet. Is that happening? It's an oddity to me.
"If I type a number into any cell . . ." Well, I have to keep the autocalc OFF and manual ON because I keep getting stopped on those pesky pop ups if I leave the autocalc on. So, if I am not running the acro, I hit F9 to change my numbers. If I hold delete on an empty cell, it doesn't do anything.
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,913
Members
449,093
Latest member
dbomb1414

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