Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-11-2014, 11:27 PM
macropod's Avatar
macropod macropod is offline Looking for VBA or Macro Counting a specific value occuring in single, random, changing cell? Windows 7 64bit Looking for VBA or Macro Counting a specific value occuring in single, random, changing cell? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use a macro like the following in the worksheet's code module:
Code:
Private Sub Worksheet_Calculate()
Application.Calculation = xlCalculationManual
If Range("A10").Value < 0.1 Then
  Range("b10").Value = Range("b10").Value + 1
End If
End Sub
Note that the code sets the Calculation mode to Manual. That's necessary to stop the update forcing another re-calc. It also means you'll need to manually re-set the calculation mode when you're done.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for VBA or Macro Counting a specific value occuring in single, random, changing cell? How do you count how often a specific value occurs in single changing cell? blackjack Excel 12 09-03-2014 10:41 AM
Looking for VBA or Macro Counting a specific value occuring in single, random, changing cell? Sum values within a single cell shabbaranks Excel 17 05-13-2014 06:47 PM
Word counting macro for newly added portion? New Daddy Word VBA 24 09-30-2013 07:30 PM
How to fill a cell with random numbers to do calculations? zanat0s Excel 1 06-13-2011 10:33 AM
Looking for VBA or Macro Counting a specific value occuring in single, random, changing cell? How can I write the following (whole) formula in a single cell? Learner7 Excel 1 07-19-2010 10:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:27 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