Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force recalc of formulas saved as text
What is the syntax to emulate re-editing a cell, as in pressing F2 then Enter ?
I have a series of formulas that were built with vba code, but some of the cells that these were created in must have been formatted as text since the formulas did not calculate. The formulas are syntactically correct, but I need to get Excel to treat them as formulas instead of text. I have changed the formatting to general, and I want to run a simple macro on the range to force an edit and re-enter of each cell in the range... but I cannot remember the vba method (or maybe a property?) to accomplish this. Any help appreciated. Thanks, TK |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force recalc of formulas saved as text
Select the cells in question, the run code like the following:
Sub AAA() Dim Rng As Range For Each Rng In Selection.Cells Rng.Formula = Rng.Formula Next Rng End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "T Kirtley" wrote in message ... What is the syntax to emulate re-editing a cell, as in pressing F2 then Enter ? I have a series of formulas that were built with vba code, but some of the cells that these were created in must have been formatted as text since the formulas did not calculate. The formulas are syntactically correct, but I need to get Excel to treat them as formulas instead of text. I have changed the formatting to general, and I want to run a simple macro on the range to force an edit and re-enter of each cell in the range... but I cannot remember the vba method (or maybe a property?) to accomplish this. Any help appreciated. Thanks, TK |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Force recalc of formulas saved as text
Beautiful. Just what I needed.
Thanks alot! TK "Chip Pearson" wrote: Select the cells in question, the run code like the following: Sub AAA() Dim Rng As Range For Each Rng In Selection.Cells Rng.Formula = Rng.Formula Next Rng End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "T Kirtley" wrote in message ... What is the syntax to emulate re-editing a cell, as in pressing F2 then Enter ? I have a series of formulas that were built with vba code, but some of the cells that these were created in must have been formatted as text since the formulas did not calculate. The formulas are syntactically correct, but I need to get Excel to treat them as formulas instead of text. I have changed the formatting to general, and I want to run a simple macro on the range to force an edit and re-enter of each cell in the range... but I cannot remember the vba method (or maybe a property?) to accomplish this. Any help appreciated. Thanks, TK |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Force text to overlap | Setting up and Configuration of Excel | |||
excel save as csv - force text qualifier on every text field | Excel Discussion (Misc queries) | |||
force numbers as text as seen on screen | Excel Discussion (Misc queries) | |||
force evaluation of text | Excel Discussion (Misc queries) | |||
Force minimum text box entry | Excel Programming |