Convert cell's text to formula

dsl224

New Member
Joined
Sep 17, 2003
Messages
5
Is there a quick way, other than VBA, to put the contents of a cell that has the text of a formula into a second cell, but as a real formula?

What I mean is, if A1 has as text: abs(-1), I would like cell B1 to read the contents of A1 and evaluate it and put the results into B2.

TIA,
David
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi dsl224:

EVAL in Aladin's post is a function available in MoreFunc Add-in that is available for free.

So, to be able to use EVAL, you need to have the MoreFunc Add-in installed -- otherwise you need to write another UserDefined function in place of EVAL.
 
Upvote 0
dsl224 said:
Thanks. I don't want to start using Add-ins. Do you know of any other solution or UDF?
Hi dsl224:

You can use the following UDF ...
Code:
Function yEval(entry As String)
    yEval = Evaluate(entry)
End Function
and its usage is illustrated in the following ...
y030917h1.xls
ABCDEF
1abs(-1)1a3
25*420b5
3vlookup("b",$E$1:$F$4,2,0)5c2
4d1
Sheet4


I hope this helps. If I have misunderstood your question -- my apologies!
 
Upvote 0
Does anybody have a VB solution for doing the opposite?

Daily, I must format the flatfile result of a days worth of web form inquiries. Names, addresses and cities are WRITTEN LIKE THIS or tHiS, etc.

=proper(D2) returns the proper result. Using Notepad and a series of Copies/Pastes I can copy the resulting values over the original data.

Is there a way to capture the results of the formula so as to copy it over the original, incorrectly cased data?
 
Upvote 0
How about:

Sub ProperCase()
Dim c As Range

For Each c In Selection
c.Value = Application.WorksheetFunction.Proper(c.Value)
Next c
End Sub
 
Upvote 0

Forum statistics

Threads
1,225,968
Messages
6,188,105
Members
453,460
Latest member
Cjohnson3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top