ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copy formula so destination displays formula as text (https://www.excelbanter.com/excel-discussion-misc-queries/47979-copy-formula-so-destination-displays-formula-text.html)

Omunene

Copy formula so destination displays formula as text
 
Cell C123 contains the value 99.

I want cell A1 to display that value (99) and cell B1 to display the formula
(=C123).
I put =C123 in cell A1. What do I put in cell B1?

I know I can toggle between value and formula but how do I get them to both
display side-by-side at once?

THANK YOU!

David Billigmeier

Here is a UDF solution that will work:

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

Then in B1 enter =GetFormula(C123)


--
Regards,
Dave


"Omunene" wrote:

Cell C123 contains the value 99.

I want cell A1 to display that value (99) and cell B1 to display the formula
(=C123).
I put =C123 in cell A1. What do I put in cell B1?

I know I can toggle between value and formula but how do I get them to both
display side-by-side at once?

THANK YOU!


Omunene

THANKS DAVE!


"David Billigmeier" wrote:

Here is a UDF solution that will work:

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

Then in B1 enter =GetFormula(C123)


--
Regards,
Dave


"Omunene" wrote:

Cell C123 contains the value 99.

I want cell A1 to display that value (99) and cell B1 to display the formula
(=C123).
I put =C123 in cell A1. What do I put in cell B1?

I know I can toggle between value and formula but how do I get them to both
display side-by-side at once?

THANK YOU!



All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com