## Another EXCEL FORMULA DISPLAY QUESTION

## Another EXCEL FORMULA DISPLAY QUESTION

(OP)

This is a question in line with Thread770-37797,"FORMULA DISPLAY IN EXCEL".

In that thread several functions were offered as to how to display a cell formula in another cell, eg "GetFormula".

Now, my question is, how can it be manuplated to display the cell values rather than the cell addresses??

i.e., instead of A1+B6....., display the value shown in the A1 and B6 cells.

I have spent some time trying with not much success, then again, I am not very handy with puting user functions together.

I would really appreciate any input that any one of you may have.

Much Thanks.

In that thread several functions were offered as to how to display a cell formula in another cell, eg "GetFormula".

Now, my question is, how can it be manuplated to display the cell values rather than the cell addresses??

i.e., instead of A1+B6....., display the value shown in the A1 and B6 cells.

I have spent some time trying with not much success, then again, I am not very handy with puting user functions together.

I would really appreciate any input that any one of you may have.

Much Thanks.

## RE: Another EXCEL FORMULA DISPLAY QUESTION

if display formulas is activated and you want the values displayed, like the function getFormula, simply create a function similar to getFormula, but replace the code with:

GetValue = Cell.Value.

i've not checked and tested this, but from memory, i believe it should work.

-pmover

## RE: Another EXCEL FORMULA DISPLAY QUESTION

thank you kindly, forgive me if i dont follow, but since the value of the original cell is already displayed i dont need to display it again. what i am after is, say, cell A5 formula is "=B1+C1" and the values in B1 and C1 are 2 and 5 respectively, I am after displaying 2+5 in B5 insteat of B1+C1 or 7 .

I will appreciate it if yourself or anyone else in the forum could help

## RE: Another EXCEL FORMULA DISPLAY QUESTION

If that's the case, you can use VB's string search functions to search for the "+" signs or other operators that you know of apriori. This is necessary because the function for finding unknown operators would be quite involved. Ditto for parentheses, you'll need to know where and how many there are.

After finding the operator, you can strip out the cell or name reference and then concatenate a string using the content value reference and the operators.

TTFN

## RE: Another EXCEL FORMULA DISPLAY QUESTION

Thread770-41701

The TKSolver guys have an add-on for Excel that displays formulas as regular equations and has a selectable level of substitution.

TTFN

## RE: Another EXCEL FORMULA DISPLAY QUESTION

You will find your answer using VBA function disfor(), provided at: http://www.geocities.com/SiliconValley/Hills/1829/VBA/disfor.htm

It displays the values in the formula instead of references.

## RE: Another EXCEL FORMULA DISPLAY QUESTION

## RE: Another EXCEL FORMULA DISPLAY QUESTION

David

David Simpson, PE

MuleShoe Engineering

www.muleshoe-eng.com

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.

The harder I work, the luckier I seem

## RE: Another EXCEL FORMULA DISPLAY QUESTION

You can omit the spaces surrounding the + if you wish