Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Force text to overlap Aled Davies Setting up and Configuration of Excel 3 April 7th 23 12:23 PM
excel save as csv - force text qualifier on every text field Newbie-Don Excel Discussion (Misc queries) 6 April 2nd 23 08:33 PM
force numbers as text as seen on screen craig331 Excel Discussion (Misc queries) 1 April 5th 06 01:53 AM
force evaluation of text Light Excel Discussion (Misc queries) 3 March 15th 06 02:54 PM
Force minimum text box entry JBL[_3_] Excel Programming 1 July 15th 04 05:22 PM


All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"