Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Display formula and result at the same time - possible??

118 views
Skip to first unread message

Sven Koernchen

unread,
Oct 6, 1997, 3:00:00 AM10/6/97
to

Hello everybody,

I've got a application where I want the user to type in a formula (in one
cell) and display the result of the formula in another cell.
The approach to create a function which parses the content of the
formula-cell and then executes the formula (e.g. by preceding it with a
equals sign) didn't seems to work because a function can not alter the
formula property of a cell (a sub can, though). I like the idea to use a
function because it will be only executed when the content of the
formula-cell changes.

Did anybody had a similar problem or have a solution for it?

I appreciate any help! Thanks.

Sven


DMcRitchie

unread,
Oct 7, 1997, 3:00:00 AM10/7/97
to

Sven,

I once created a spreadsheet in REXX that used EXECUTE to use the visible
formula for it's calculation. (REXX is not a spreadsheet language).

I always considered EXCEL to be deficient in not being able to show the formula
in the same view. Through this newsgroup and particularly with the help of
Alan Beban, I can provide you the means of documenting a formula that you are
using in another cell. This is the opposite of what you have asked for,
though it does match your subject line.. If the purpose is to know that the
formula shown is what is in use then it shouldn't make any difference which
mirrors the other.

Example:
a1 contains 33 and displays 33
b1 contains =2*44 and displays 88
c1 contains =a1+b1 and displays 121
d1 contains =getformula(c1) and displays =a1+b1

Put the following function into your MODULE sheet, which can be in the same
workbook.

Function GetFormula(Cell)
GetFormula = Cell.Formula
End Function


Hope this suits your purpose, it sure has helped me.

David McRitchie
DMcRi...@aol.com
----------------------------------------------------------------------------
REXX programmers might be interested in my site, which pertains to REXX edit
macros.
http://members.aol.com/dmcritchie/nclist.htm
----------------------------------------------------------------------------
>Subject: Display formula and result at the same time - possible??
>Path:
>lobby01.news.aol.com!newstf02.news.aol.com!portc02.blue.aol.com!howland.e
rols.net!news.maxwell.syr.edu!newsfeed.ecrc.net!194.163.252.233.MISMATCH!n
ews-fra.maz.net!bignews.guetersloh.mediaways.net!jupiter.NIC.DTAG.DE!news.
stgl.sel.alcatel.de!not-for
>-mail
>From: "Sven Koernchen" <S.Koe...@stgl.sel.alcatel.de>
>Newsgroups: microsoft.public.excel.misc
>Date: Mon, 6 Oct 1997 17:29:34 +0200
>Organization: Alcatel SEL AG Stuttgart
>Lines: 21
>Message-ID: <61b0e6$2lh$1...@slsgcz.stgl.sel.alcatel.de>
>NNTP-Posting-Host: sls0as.stgl.sel.alcatel.de
>X-Newsreader: Microsoft Outlook Express 4.71.1008.3
>X-MimeOle: Produced By Microsoft MimeOLE Engine V4.71.1008.3

0 new messages