Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

returning to the "Display values behind formula" in excel 1

Status
Not open for further replies.
Replies continue below

Recommended for you

I found it at:
with the download at:

I downloaded it and it doesn't seem to be malware (from a quick look)

Unfortunately it isn't open source.

You might find my Eval2 spreadsheet useful; here:

It doesn't do exactly what you asked for (which from a quick look doesn't seem to be a simple job), but what it does do is if you have a two columns with variable names, and associated values:
a 1
b 2
c 3
and a function entered as text:
= a + b + c
then it allows you to either evaluate the function, or display the individual values:
= 1 + 2 + 3


Doug Jenkins
Interactive Design Services
 
thank you Doug
It is OK and working.

Just for my curiosity- why "doesn't seem to be a simple job" ?

One may use:

Public Function DisplayFormula(rng As Range) As String
Displayformula = rng.Formula
End Function

and generate the formula with cell addresses and operators. The next step is to substitute the cell values instead of the cell addresses. Is that the problem?

(it is a pity that for me, it is a problem)

ykantor
 
Nothing is ever a problem to someone who hasn't done it yet; we just had a supplier finding that they couldn't actually do what they proposed.

Writing a robust parser is not a simple task. What if I used aliases for the cell addresses? Note that this macro does allow aliases, i.e., you can make a = z/y + x*z with the appropriate alias definitions, and the macro will still return the correct values.


TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
IRstuff - A limited function is still valuable for me ( and presumably for other users as well). i.e no aliases, no named ranges, just plain cell addresses.

Doug - the DISFOR function works fine.

regards

ykantor
 
Status
Not open for further replies.
Back
Top