Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how to obtain the result of the formula in another cell

hi,
I use excel everyday ,but there is a problem that puzzled me for a long
time.when I input a formula ,for example,in one cell I input
(12.36+2.36)*25+36,and I want to obtain the result of the formula in
another cell,what should I do.I always get (12.36+2.36)*25+36 itself instead
of the result 404.maybe someone would tell me sth helpful,or would you give
some hints in vba.I think confirmedly it is unnecessary to input the formula
once again to get the result.though I havent solve the issue.
regards.
Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default how to obtain the result of the formula in another cell

On Sat, 9 Aug 2003 17:01:26 +0900, "youngman"
wrote:

hi,sorry for not having my problem well explained ,

i dont In cell A1 enter the expression:
=(12.36+2.36)*25+36
instead
i just want toIn cell A1 enter the expression:
(12.36+2.36)*25+36(without ***=***)
(for i have to show the formula explicitly )
what should i do.


Off the top of my head the only way I can see you being able to do
that is to use a User Defined Function like this one:

Function EvaluateMyExpression(ExpressionText) As Double

EvaluateMyExpression = Evaluate("=" & ExpressionText)

End Function

Copy that function and paste it into a standard module in your
workbook.

Then in cell B1 you could have the formula

=EvaluateMyExpression(A1)

That will return 404 in B1, even though the entry in A1 is just plain
text.

"Hank Scorpio" wrote in message
.. .
On Sat, 9 Aug 2003 15:37:35 +0900, "youngman"
wrote:


Don't forget the = sign at the front.

In cell B1, put the expression:
=A1

This will return the result of the formula.

There's no need for any VBA programming to do that, it's just straight
expression entry.

I use excel everyday ,but there is a problem that puzzled me for a long
time.when I input a formula ,for example,in one cell I input
(12.36+2.36)*25+36,and I want to obtain the result of the formula in
another cell,what should I do.I always get (12.36+2.36)*25+36 itself

instead
of the result 404.maybe someone would tell me sth helpful,or would you

give
some hints in vba.I think confirmedly it is unnecessary to input the

formula
once again to get the result.though I havent solve the issue.
regards.


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default how to obtain the result of the formula in another cell


You can't do it as a worksheet function directly, but you can do it as a
defined name. For instance, you can insert a name into the workbook called
'this.value', and give it a reference of =EVALUATE(A1). If you have cell B1
selected when you create this name, for every cell that you input the
formula =this.value it will pick up and resolve the string in the previous
column.

This technique uses the XLM (Excel 4 & prior macro language) EVALUATE
function, which carries a health warning with it. There are many reports
that copying that cell and trying to paste it into a cell in another
worksheet will CRASH Excel (97 and possibly 2000), Unsaved changes would be
lost.

Personally, I don't get this in my version of XL2000, I get a message box
saying it can't be done, and as I use an EVAL UDF, it has never been a
problem for me, but be aware.


--

HTH

Bob Phillips

"youngman" wrote in message
...
hi,sorry for not having my problem well explained ,

i dont In cell A1 enter the expression:
=(12.36+2.36)*25+36
instead
i just want toIn cell A1 enter the expression:
(12.36+2.36)*25+36(without ***=***)
(for i have to show the formula explicitly )
what should i do.

thank you.


"Hank Scorpio" wrote in message
...
On Sat, 9 Aug 2003 15:37:35 +0900, "youngman"
wrote:


Don't forget the = sign at the front.

In cell B1, put the expression:
=A1

This will return the result of the formula.

There's no need for any VBA programming to do that, it's just straight
expression entry.

I use excel everyday ,but there is a problem that puzzled me for a long
time.when I input a formula ,for example,in one cell I input
(12.36+2.36)*25+36,and I want to obtain the result of the formula in
another cell,what should I do.I always get (12.36+2.36)*25+36 itself

instead
of the result 404.maybe someone would tell me sth helpful,or would you

give
some hints in vba.I think confirmedly it is unnecessary to input the

formula
once again to get the result.though I havent solve the issue.
regards.


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default how to obtain the result of the formula in another cell

It would be much better to code the actual formula as a formula,
that way you know that you are working with a valid formula,
that does not have errors and that gets adjusted when you
insert/delete rows/columns. Then in your other cell use
a function to obtain the formula from the cell with the formula.
This way you are not prone to inevitable errors doing it the
other way around.

=GetFormula(D1)
=personal.xls!GetFormula(D1)

More information in
http://www.mvps.org/dmcritchie/excel/formula.htm

David McRitchie, Microsoft MVP, Excel


"youngman" wrote ...
=I input a formula ,for example,in one cell I input
(12.36+2.36)*25+36,and I want to obtain the result of the formula in
another cell,what should I do.

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
Formula to obtain result from non exact sequence match The Hit Man Excel Worksheet Functions 2 May 18th 10 06:18 AM
Formula Bar F9 Result differs from cell result??? Aaron Excel Worksheet Functions 3 May 15th 08 06:32 PM
Obtain a Year to Date result without all cells of data being fille bdamin Excel Worksheet Functions 3 April 18th 08 04:58 PM
Advanced formula - Return result & Show Cell Reference of result Irv Excel Worksheet Functions 7 May 6th 06 03:36 AM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"