May I know what is wrong over here?
I have a formula in A1 cell (eq. 3 5 formatted as text) and try to let B1
have the result of A1. so I set B1 =Value(A1)...it doesn't work but it will
work if I put =value(3 5)...
Is there anyone can tell me what is wrong here?Nothing wrong, that is the way excel works, you need either VBA or and old
xlm trick which is not recommended since it can crash in earlier versions
here's the VBA version
Option Explicit
Function Eval(myStr As String) As Variant
Eval = Application.Evaluate(myStr)
End Function=EVAL(A1)
will return 8
www.mvps.org/dmcritchie/excel/install.htm
how to install macros or UDFs
--
Regards,
Peo Sjoblom
Portland, Oregon
quot;tinaquot; gt; wrote in message
...
gt; May I know what is wrong over here?
gt;
gt; I have a formula in A1 cell (eq. 3 5 formatted as text) and try to let B1
gt; have the result of A1. so I set B1 =Value(A1)...it doesn't work but it
gt; will
gt; work if I put =value(3 5)...
gt; Is there anyone can tell me what is wrong here?
gt;Thank you very much
It's a really help a lot.
Tina
quot;Peo Sjoblomquot; wrote:
gt; Nothing wrong, that is the way excel works, you need either VBA or and old
gt; xlm trick which is not recommended since it can crash in earlier versions
gt;
gt; here's the VBA version
gt;
gt; Option Explicit
gt;
gt; Function Eval(myStr As String) As Variant
gt; Eval = Application.Evaluate(myStr)
gt; End Function
gt;
gt;
gt; =EVAL(A1)
gt;
gt; will return 8
gt;
gt; www.mvps.org/dmcritchie/excel/install.htm
gt;
gt; how to install macros or UDFs
gt;
gt;
gt;
gt;
gt; --
gt; Regards,
gt;
gt; Peo Sjoblom
gt;
gt; Portland, Oregon
gt;
gt;
gt;
gt;
gt; quot;tinaquot; gt; wrote in message
gt; ...
gt; gt; May I know what is wrong over here?
gt; gt;
gt; gt; I have a formula in A1 cell (eq. 3 5 formatted as text) and try to let B1
gt; gt; have the result of A1. so I set B1 =Value(A1)...it doesn't work but it
gt; gt; will
gt; gt; work if I put =value(3 5)...
gt; gt; Is there anyone can tell me what is wrong here?
gt; gt;
gt;
gt;
I don't remember where I read this (probably in a John Walkenbach book,) but
I just tried this and it also worked. I created a Named formla (named range)
like so:
EvalCellToLeft=EVALUATE(!F15)When you create the named range, just use whatever cell is to the left of
where you currently are. If you don't want it to be specific to the
worksheet you are in, use the ! with nothing before it.) Then with this, I
tried the following and it worked:
3 58
3*515
3/50.6
3^5243
It also worked when I tried the formula in a different worksheet. BTW, the
formula is of course =EvalCellToLeft
Also, you could of course name it to anything you wanted. It would not work
in a different workbook unless you created the named formula there also.
--
Kevin Vaughnquot;tinaquot; wrote:
gt; Thank you very much
gt; It's a really help a lot.
gt;
gt; Tina
gt;
gt; quot;Peo Sjoblomquot; wrote:
gt;
gt; gt; Nothing wrong, that is the way excel works, you need either VBA or and old
gt; gt; xlm trick which is not recommended since it can crash in earlier versions
gt; gt;
gt; gt; here's the VBA version
gt; gt;
gt; gt; Option Explicit
gt; gt;
gt; gt; Function Eval(myStr As String) As Variant
gt; gt; Eval = Application.Evaluate(myStr)
gt; gt; End Function
gt; gt;
gt; gt;
gt; gt; =EVAL(A1)
gt; gt;
gt; gt; will return 8
gt; gt;
gt; gt; www.mvps.org/dmcritchie/excel/install.htm
gt; gt;
gt; gt; how to install macros or UDFs
gt; gt;
gt; gt;
gt; gt;
gt; gt;
gt; gt; --
gt; gt; Regards,
gt; gt;
gt; gt; Peo Sjoblom
gt; gt;
gt; gt; Portland, Oregon
gt; gt;
gt; gt;
gt; gt;
gt; gt;
gt; gt; quot;tinaquot; gt; wrote in message
gt; gt; ...
gt; gt; gt; May I know what is wrong over here?
gt; gt; gt;
gt; gt; gt; I have a formula in A1 cell (eq. 3 5 formatted as text) and try to let B1
gt; gt; gt; have the result of A1. so I set B1 =Value(A1)...it doesn't work but it
gt; gt; gt; will
gt; gt; gt; work if I put =value(3 5)...
gt; gt; gt; Is there anyone can tell me what is wrong here?
gt; gt; gt;
gt; gt;
gt; gt;
Regarding my previous post, I wonder if that is the old XLM trick to which
Peo is referring.
--
Kevin Vaughnquot;tinaquot; wrote:
gt; May I know what is wrong over here?
gt;
gt; I have a formula in A1 cell (eq. 3 5 formatted as text) and try to let B1
gt; have the result of A1. so I set B1 =Value(A1)...it doesn't work but it will
gt; work if I put =value(3 5)...
gt; Is there anyone can tell me what is wrong here?
gt;
In pre 2002 versions if you copy the formula to another sheet it will crash
brutally and you will lose all work
--
Regards,
Peo Sjoblom
Portland, Oregon
quot;Kevin Vaughnquot; gt; wrote in message
...
gt; Regarding my previous post, I wonder if that is the old XLM trick to which
gt; Peo is referring.
gt; --
gt; Kevin Vaughn
gt;
gt;
gt; quot;tinaquot; wrote:
gt;
gt;gt; May I know what is wrong over here?
gt;gt;
gt;gt; I have a formula in A1 cell (eq. 3 5 formatted as text) and try to let B1
gt;gt; have the result of A1. so I set B1 =Value(A1)...it doesn't work but it
gt;gt; will
gt;gt; work if I put =value(3 5)...
gt;gt; Is there anyone can tell me what is wrong here?
gt;gt;Argh, I did not know that. And I am using 2000. Thanks.
--
Kevin Vaughnquot;Peo Sjoblomquot; wrote:
gt; In pre 2002 versions if you copy the formula to another sheet it will crash
gt; brutally and you will lose all work
gt;
gt; --
gt; Regards,
gt;
gt; Peo Sjoblom
gt;
gt; Portland, Oregon
gt;
gt;
gt;
gt;
gt; quot;Kevin Vaughnquot; gt; wrote in message
gt; ...
gt; gt; Regarding my previous post, I wonder if that is the old XLM trick to which
gt; gt; Peo is referring.
gt; gt; --
gt; gt; Kevin Vaughn
gt; gt;
gt; gt;
gt; gt; quot;tinaquot; wrote:
gt; gt;
gt; gt;gt; May I know what is wrong over here?
gt; gt;gt;
gt; gt;gt; I have a formula in A1 cell (eq. 3 5 formatted as text) and try to let B1
gt; gt;gt; have the result of A1. so I set B1 =Value(A1)...it doesn't work but it
gt; gt;gt; will
gt; gt;gt; work if I put =value(3 5)...
gt; gt;gt; Is there anyone can tell me what is wrong here?
gt; gt;gt;
gt;
gt;
- Dec 18 Mon 2006 20:34
value function
close
全站熱搜
留言列表
發表留言