![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 11:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com