Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2014, 05:46 AM
gebobs gebobs is offline How do you count how often a specific value occurs in single changing cell? Windows 7 64bit How do you count how often a specific value occurs in single changing cell? Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

I kind of kludged it using a few "mirror" cells. Again it is using the condition level of 0.5 to make testing easier.



Cells A1 and A2 are as you have them.

Cell C1 stores the value of A1 as it is calculated when the button is pressed. This needs to be done because when the code writes the counter, it will recalculate the Rand() again and you won't see what the value was.

Cell C2 is the counter. If you use A2 as the counter, the code overwrites the equation.

Thus the code is:

Sub Button1_Click()

Dim x As Double

Calculate
x = Cells(2, 1)
Cells(1, 3) = Cells(1, 1)
Cells(2, 3) = Cells(2, 3) + x

End Sub

There are probably better ways. See attached.
Attached Files
File Type: xlsm Book1.xlsm (16.1 KB, 24 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you count how often a specific value occurs in single changing cell? Sum values within a single cell shabbaranks Excel 17 05-13-2014 06:47 PM
How do you count how often a specific value occurs in single changing cell? count how many tims a certain value occurs lucnijs Excel 6 03-26-2012 09:29 AM
How to count year lapse (rounded off) based on specific date KIM SOLIS Excel 1 11-01-2011 10:50 AM
How do you count how often a specific value occurs in single changing cell? How to count multiple values in a single cell, except zero? iuliandonici Excel 1 04-13-2011 09:45 PM
changing word count hamster Word 3 06-03-2010 01:53 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft