#1   Report Post  
Posted to microsoft.public.excel.misc
S3 S3 is offline
external usenet poster
 
Posts: 1
Default display formula

How do i display a formula or function in the cell next to the one containing
the result.
For example the function =date(2008,1,31) in cell A1 gives me 1/31/2008 in
cell A1. Now in cell A2 I want to show the function displayed as
=date(2008,1,31) instead of the result so that one can see the function next
to the result.

I would be grateful if someone can offer me some help about doing this.

Thanks so much.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default display formula

One way:

Select the formula cell A1

In the formula bar add an apostrophe to the beginning of the formula so that
it looks like this:

'=date(2008,1,31)

Then hit enter.

Now, just copy A1 to A2 then remove the apostrophe from cell A1.

Biff

"S3" wrote in message
...
How do i display a formula or function in the cell next to the one
containing
the result.
For example the function =date(2008,1,31) in cell A1 gives me 1/31/2008 in
cell A1. Now in cell A2 I want to show the function displayed as
=date(2008,1,31) instead of the result so that one can see the function
next
to the result.

I would be grateful if someone can offer me some help about doing this.

Thanks so much.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default display formula

You could employ a User Defined Function in the adjacent cell.

Function ShowFormula(cell)
ShowFormula = "No Formula"
If cell.HasFormula Then ShowFormula = cell.Formula
End Function

=ShowFormula(cellref)

First off.........save a backup of your workbook.

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there.

Save the workbook and hit ALT + Q to return to Excel window.

Enter the formula in a helper cell as explained above.


Gord Dibben MS Excel MVP

On Wed, 6 Jun 2007 18:20:00 -0700, S3 wrote:

How do i display a formula or function in the cell next to the one containing
the result.
For example the function =date(2008,1,31) in cell A1 gives me 1/31/2008 in
cell A1. Now in cell A2 I want to show the function displayed as
=date(2008,1,31) instead of the result so that one can see the function next
to the result.

I would be grateful if someone can offer me some help about doing this.

Thanks so much.


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
Formula value display drk442 Excel Discussion (Misc queries) 4 November 11th 06 07:47 AM
how to convert a formula into text in order to display the formula Claudio Hartzstein Excel Discussion (Misc queries) 2 July 13th 06 09:58 AM
How do I display the tab name in a formula Ian Excel Worksheet Functions 1 July 15th 05 02:41 PM
display only one formula norcalchick2207 Excel Discussion (Misc queries) 1 February 4th 05 06:05 AM
Modifying a formula to display the results of another formula carl Excel Worksheet Functions 1 January 6th 05 05:22 PM


All times are GMT +1. The time now is 09:04 AM.

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"