Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2011, 11:10 PM
Catalin.B Catalin.B is offline Convert Formula Result to Static Text Windows Vista Convert Formula Result to Static Text Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

you can setup cell A1 to decide if the macro should run.
info about events :http://www.cpearson.com/excel/events.htm
but will work only when you change the value in cell A1,
it will not fire when a formula result changes, so this means it will work the same way
How do I run a macro every time a certain cell changes its value?
There is an event called Worksheet_Change which is triggered when a value is entered (it will not fire when a formula result changes). One of the arguments to this event is 'Target' which is a reference to what changed. Since this event will occur whenever a value changes - you can use the target to see if it is the cell you are interested in:
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub Else 'Do whatever you need to do... End If End Sub

Reply With Quote
  #2  
Old 08-19-2011, 06:38 AM
Catalin.B Catalin.B is offline Convert Formula Result to Static Text Windows Vista Convert Formula Result to Static Text Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Quote:
Originally Posted by MYGS View Post
Yes 'on blinking' would be good... LOL

The column doesn't get updated when you change a cell, only when you do the double-click + ENTER process, I don't know anyone who does this, do you?
I don't know anyone who does this, except maybe, you...
Most of the people i know, between double click and enter, is typing data, or writing formulas...

Another idea for you is to run your macro every 30 seconds, or less ...

Sub CopyFormulaResults()
Application.OnTime Now + TimeValue("00:00:10"), "CopyFormulaResults"
Range("H10:H50").Select
Selection.Copy
Range("I10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge Fields and Static Text kbranden Mail Merge 1 06-15-2011 09:02 AM
Convert Formula Result to Static Text Making items (text, pictures, etc.) static on page Jeremiahts Word 3 04-07-2011 09:54 PM
convert html to text at opening etfjr Word 0 12-13-2010 11:14 AM
Convert Number to Text devcon Word 0 07-10-2010 01:16 AM
Convert Formula Result to Static Text Checkbox on Userform result in Text in Word Dolfie_twee Word VBA 1 06-22-2010 07:54 AM

Other Forums: Access Forums

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