Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Convert Text to a Formula

I needed to create a text string which is a formula. I did it and now have
400 entries like the following:
=DATE(2003,10,04)
Each of these entries is a unique date which was converted from the original
Lotus file. But each entry is a text string - not a formula. So the actual
value in the cell is just as shown above - it displays as =DATE(YYYY,MM,DD).
There is an apostrophe at the beginning. I can manually edit each entry and
delete the apostrophe, but that's a pain in the you know what. I can't do a
replace all - replacing apostrophe with nothing - that doesn't work. I need
these entries to be formulas so that they display as the actual Date - and in
addition I want to keep the formula - in other words I don't want to do a
paste special values. Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Convert Text to a Formula

Enter and run this small macro:

Sub tic_killer()
Set rr = ActiveSheet.UsedRange.SpecialCells(xlCellTypeConst ants, xlTextValues)
For Each r In rr
If r.PrefixCharacter = "'" Then
r.Value = r.Value
End If
Next
End Sub

--
Gary''s Student - gsnu200789


"dhstein" wrote:

I needed to create a text string which is a formula. I did it and now have
400 entries like the following:
=DATE(2003,10,04)
Each of these entries is a unique date which was converted from the original
Lotus file. But each entry is a text string - not a formula. So the actual
value in the cell is just as shown above - it displays as =DATE(YYYY,MM,DD).
There is an apostrophe at the beginning. I can manually edit each entry and
delete the apostrophe, but that's a pain in the you know what. I can't do a
replace all - replacing apostrophe with nothing - that doesn't work. I need
these entries to be formulas so that they display as the actual Date - and in
addition I want to keep the formula - in other words I don't want to do a
paste special values. Any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default Convert Text to a Formula

Copy, then Paste Special: Values will get rid of the apostrophe. Then do a
Find = Replace = (with the equal sign as the Find and the Replace) to force
it into a formula.

"dhstein" wrote:

I needed to create a text string which is a formula. I did it and now have
400 entries like the following:
=DATE(2003,10,04)
Each of these entries is a unique date which was converted from the original
Lotus file. But each entry is a text string - not a formula. So the actual
value in the cell is just as shown above - it displays as =DATE(YYYY,MM,DD).
There is an apostrophe at the beginning. I can manually edit each entry and
delete the apostrophe, but that's a pain in the you know what. I can't do a
replace all - replacing apostrophe with nothing - that doesn't work. I need
these entries to be formulas so that they display as the actual Date - and in
addition I want to keep the formula - in other words I don't want to do a
paste special values. Any suggestions?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 266
Default Convert Text to a Formula

Thanks so much to both of you. Thanks Gary for creating that macro - I'll
put it in my list of macros for future reference.

sb1920alk - Thank you - that did the trick - I don't know how you knew that,
but replacing "=" with "=" converted to a formula. You both have my
permission to take the rest of the day off.

"sb1920alk" wrote:

Copy, then Paste Special: Values will get rid of the apostrophe. Then do a
Find = Replace = (with the equal sign as the Find and the Replace) to force
it into a formula.

"dhstein" wrote:

I needed to create a text string which is a formula. I did it and now have
400 entries like the following:
=DATE(2003,10,04)
Each of these entries is a unique date which was converted from the original
Lotus file. But each entry is a text string - not a formula. So the actual
value in the cell is just as shown above - it displays as =DATE(YYYY,MM,DD).
There is an apostrophe at the beginning. I can manually edit each entry and
delete the apostrophe, but that's a pain in the you know what. I can't do a
replace all - replacing apostrophe with nothing - that doesn't work. I need
these entries to be formulas so that they display as the actual Date - and in
addition I want to keep the formula - in other words I don't want to do a
paste special values. Any suggestions?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Convert Text to a Formula

Have a look at the INDIRECT function. It takes a text value and converts it
into a reference.

Rob


"dhstein" wrote in message
...
I needed to create a text string which is a formula. I did it and now have
400 entries like the following:
=DATE(2003,10,04)
Each of these entries is a unique date which was converted from the
original
Lotus file. But each entry is a text string - not a formula. So the
actual
value in the cell is just as shown above - it displays as
=DATE(YYYY,MM,DD).
There is an apostrophe at the beginning. I can manually edit each entry
and
delete the apostrophe, but that's a pain in the you know what. I can't do
a
replace all - replacing apostrophe with nothing - that doesn't work. I
need
these entries to be formulas so that they display as the actual Date - and
in
addition I want to keep the formula - in other words I don't want to do a
paste special values. Any suggestions?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Convert Text to a Formula

That's a really ingenious trick!
I'm currently seeking for something like that for 2 hours!!!
Thanks a lot!!!



non wrote:

Convert Text to a Formula
02-Jun-08

Copy, then Paste Special: Values will get rid of the apostrophe. Then do a
Find = Replace = (with the equal sign as the Find and the Replace) to force
it into a formula.

"dhstein" wrote:

EggHeadCafe - Software Developer Portal of Choice
A Down and Dirty FileSystem Object Page Counter
http://www.eggheadcafe.com/tutorials...-filesyst.aspx
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
i need formula which convert figure in to text Zafar Excel Worksheet Functions 1 August 22nd 07 12:44 PM
How to convert formula to text odd Excel Worksheet Functions 2 December 15th 06 04:30 PM
convert text into Formula Ananth Excel Discussion (Misc queries) 3 September 18th 06 08:54 AM
how to convert a formula into text in order to display the formula Claudio Hartzstein Excel Discussion (Misc queries) 2 July 13th 06 09:58 AM
convert text to a value to be used in a formula otto Excel Worksheet Functions 1 May 23rd 05 07:40 PM


All times are GMT +1. The time now is 08:34 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"