Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
cyrille de brébisson
 
Posts: n/a
Default how to evaluate the content of a string as if it was a formula

hello.

I have a problem that I can not solve with excel.
I have a cell wich contain a string such as: "SIN(5)" (this is a STRING,
created using a formula).
now, I want to calculate this formula and place the result in another
string.
In short, I would like to find a function that does the same thing than
VALUE, but that is not limited to only number.

(more on my application:
I have one cel where the user can enter a formula such as SIN(X) as a
string.
I then have number from 1 to 1000 in column B and column C is
=SUBSITUTE($A$1,"X",$B1)
now, I want column D to be: =EVALUATE(C1) ...)

thanks for the help, cyrille


  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
not possible with VBA. Do you want to go this way?

--
Regards
Frank Kabel
Frankfurt, Germany

"cyrille de brébisson" schrieb im Newsbeitrag
...
hello.

I have a problem that I can not solve with excel.
I have a cell wich contain a string such as: "SIN(5)" (this is a

STRING,
created using a formula).
now, I want to calculate this formula and place the result in another
string.
In short, I would like to find a function that does the same thing

than
VALUE, but that is not limited to only number.

(more on my application:
I have one cel where the user can enter a formula such as SIN(X) as a
string.
I then have number from 1 to 1000 in column B and column C is
=SUBSITUTE($A$1,"X",$B1)
now, I want column D to be: =EVALUATE(C1) ...)

thanks for the help, cyrille



  #3   Report Post  
cyrille de brébisson
 
Posts: n/a
Default

hello,

I was able to do a macro doing:
for i=0 to 1000
select("C"+i)
a= selection.value
select("d"+i)
selection.formula="="+a
next

but I would like to avoid having to do a macro...

cyrille

"Frank Kabel" wrote in message
...
Hi
not possible with VBA. Do you want to go this way?

--
Regards
Frank Kabel
Frankfurt, Germany

"cyrille de brébisson" schrieb im Newsbeitrag
...
hello.

I have a problem that I can not solve with excel.
I have a cell wich contain a string such as: "SIN(5)" (this is a

STRING,
created using a formula).
now, I want to calculate this formula and place the result in another
string.
In short, I would like to find a function that does the same thing

than
VALUE, but that is not limited to only number.

(more on my application:
I have one cel where the user can enter a formula such as SIN(X) as a
string.
I then have number from 1 to 1000 in column B and column C is
=SUBSITUTE($A$1,"X",$B1)
now, I want column D to be: =EVALUATE(C1) ...)

thanks for the help, cyrille





  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

David McRitchie has some info here

http://www.mvps.org/dmcritchie/excel/formula.htm

scroll down to USEFORMULA


regards,

Peo Sjoblom

"cyrille de brébisson" wrote:

hello.

I have a problem that I can not solve with excel.
I have a cell wich contain a string such as: "SIN(5)" (this is a STRING,
created using a formula).
now, I want to calculate this formula and place the result in another
string.
In short, I would like to find a function that does the same thing than
VALUE, but that is not limited to only number.

(more on my application:
I have one cel where the user can enter a formula such as SIN(X) as a
string.
I then have number from 1 to 1000 in column B and column C is
=SUBSITUTE($A$1,"X",$B1)
now, I want column D to be: =EVALUATE(C1) ...)

thanks for the help, cyrille



  #5   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
as said: Without a macro you can't evaluate strings

--
Regards
Frank Kabel
Frankfurt, Germany

"cyrille de brébisson" schrieb im Newsbeitrag
...
hello,

I was able to do a macro doing:
for i=0 to 1000
select("C"+i)
a= selection.value
select("d"+i)
selection.formula="="+a
next

but I would like to avoid having to do a macro...

cyrille

"Frank Kabel" wrote in message
...
Hi
not possible with VBA. Do you want to go this way?

--
Regards
Frank Kabel
Frankfurt, Germany

"cyrille de brébisson" schrieb im Newsbeitrag
...
hello.

I have a problem that I can not solve with excel.
I have a cell wich contain a string such as: "SIN(5)" (this is a

STRING,
created using a formula).
now, I want to calculate this formula and place the result in

another
string.
In short, I would like to find a function that does the same thing

than
VALUE, but that is not limited to only number.

(more on my application:
I have one cel where the user can enter a formula such as SIN(X)

as a
string.
I then have number from 1 to 1000 in column B and column C is
=SUBSITUTE($A$1,"X",$B1)
now, I want column D to be: =EVALUATE(C1) ...)

thanks for the help, cyrille








  #6   Report Post  
Markster
 
Posts: n/a
Default

Hello Peo.

Since you are an MVP, could you politely address my questions under the post
labeled "Workbooks", directly below this post - thank you.

Markster
-----------

"Peo Sjoblom" wrote:

David McRitchie has some info here

http://www.mvps.org/dmcritchie/excel/formula.htm

scroll down to USEFORMULA


regards,

Peo Sjoblom

"cyrille de brébisson" wrote:

hello.

I have a problem that I can not solve with excel.
I have a cell wich contain a string such as: "SIN(5)" (this is a STRING,
created using a formula).
now, I want to calculate this formula and place the result in another
string.
In short, I would like to find a function that does the same thing than
VALUE, but that is not limited to only number.

(more on my application:
I have one cel where the user can enter a formula such as SIN(X) as a
string.
I then have number from 1 to 1000 in column B and column C is
=SUBSITUTE($A$1,"X",$B1)
now, I want column D to be: =EVALUATE(C1) ...)

thanks for the help, cyrille



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
Extract hyperlink string from excel cell Ryan Sapien Links and Linking in Excel 1 January 20th 05 01:24 AM
formula help Bill H. Charts and Charting in Excel 2 January 2nd 05 06:26 AM
New formula: = does not disappear Mike Excel Discussion (Misc queries) 3 December 6th 04 02:37 AM
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? Arvi Laanemets Excel Discussion (Misc queries) 0 December 2nd 04 12:29 PM
hyperlink formula David McRitchie Excel Discussion (Misc queries) 0 November 27th 04 06:32 PM


All times are GMT +1. The time now is 05:49 AM.

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"