Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
use function to change a string to function's parameter
Dear all,
If A1 is "1+1", I want to get the result in B1, how to do? I have try B1=A1, doesn't work. B1="="&A1, doesn't work. B1="="&A1 +0, reply value error. I need your suggestion. Thanks! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
use function to change a string to function's parameter
A couple of points.
1+1 in A1 will end up as text i.e. it will show "1+1" in the cell. If you want the sum 1+1 then the correct way to do it is to type =1+1 The correct formula for B1 is simply =A1 Mike "ViestaWu" wrote: Dear all, If A1 is "1+1", I want to get the result in B1, how to do? I have try B1=A1, doesn't work. B1="="&A1, doesn't work. B1="="&A1 +0, reply value error. I need your suggestion. Thanks! |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
use function to change a string to function's parameter
when A1 must be 1+1(text), do you have some idea?
and this is why I try b1="="&a1. "Mike H" wrote: A couple of points. 1+1 in A1 will end up as text i.e. it will show "1+1" in the cell. If you want the sum 1+1 then the correct way to do it is to type =1+1 The correct formula for B1 is simply =A1 Mike "ViestaWu" wrote: Dear all, If A1 is "1+1", I want to get the result in B1, how to do? I have try B1=A1, doesn't work. B1="="&A1, doesn't work. B1="="&A1 +0, reply value error. I need your suggestion. Thanks! |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
use function to change a string to function's parameter
On Tue, 20 Nov 2007 23:27:01 -0800, ViestaWu wrote:
Dear all, If A1 is "1+1", I want to get the result in B1, how to do? I have try B1=A1, doesn't work. B1="="&A1, doesn't work. B1="="&A1 +0, reply value error. I need your suggestion. Thanks! You will need to use VBA to write a simple UDF (user defined function) to do this. To enter the function, <alt-F11 opens the VB Editor. Ensure your project is highlighted in the Project Explorer window, then Insert/Module and paste the code below into the window that opens. To use this, enter the formula B1: =Eval(A1) ================================== Function Eval(str As String) Eval = Evaluate(str) End Function ========================= --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to choose if I use a parameter or not in a parameter query | Excel Discussion (Misc queries) | |||
Cells display function's text rather than its results | Excel Discussion (Misc queries) | |||
A correct IF function doesn't show the function's result in cell | Excel Discussion (Misc queries) | |||
Cell contents as the 'lookup value' parameter in HLOOKUP function | Excel Discussion (Misc queries) | |||
Unknown IF function parameter on amortization schedule | Excel Worksheet Functions |