Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 12
Default Show a cell's formula in text format in a linked cell

I want to show the formula for a specific cell in text format in another cell.

For example, if cell A1 has a simple formula of "=10+64" (but only shows an answer of "74"), how can i link this cell to B1, so that B1 only shows as text "10+64" or " =10+64", instead of the actual answer?
  #2   Report Post  
Junior Member
 
Posts: 12
Default

On Sun, 27 Jan 2013 23:28:44 +0000, TreeHugger1 wrote:


I want to show the formula for a specific cell in text format in another
cell.

For example, if cell A1 has a simple formula of "=10+64" (but only shows
an answer of "74"), how can i link this cell to B1, so that B1 only
shows as text "10+64" or " =10+64", instead of the actual answer?

You can do this with a User Defined Function (UDF).

To enter this User Defined Function (UDF), <alt-F11 opens the Visual Basic Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select Insert/Module and
paste the code below into the window that opens.

To use this User Defined Function (UDF), enter a formula like

=showformula(A1)

in B1.


======================
Function ShowFormula(rg As Range) As String
ShowFormula = rg.Formula
End Function
=======================
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
bold text of referenced cell show in formula cell zabcikranch Excel Worksheet Functions 1 February 2nd 10 07:42 PM
Formula to recognize if another cell's conditional format is true Shu of AZ Excel Discussion (Misc queries) 2 December 19th 06 03:19 AM
Why does formula show rather than results (not in text format) Caseybay Excel Worksheet Functions 4 April 24th 06 08:51 PM
how to get the formula shown in linked cell's names EXCEL$B!!(BNEWS Excel Programming 6 August 8th 05 01:52 PM
How do I use a cell's text, "A1", and put it in a formula? HighRiser Excel Worksheet Functions 1 July 6th 05 04:11 PM


All times are GMT +1. The time now is 02:07 PM.

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

About Us

"It's about Microsoft Excel"