Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default showing formula and its value simultaneously

hi
how can 1 show a formula and its resultant value in same cell or 2
different cells?
e.g. If a1=1 & a2= 2 and my formula a3=SUM(a1:a2), i would like to
see both formula SUM(a1:a2) & its resultant value which is 3 in this
case, either in 1 cell or 2 different cells.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default showing formula and its value simultaneously

You can always write the formula as a TEXT string like this:

'=SUM(A1:A2)

To combine both in the same cell:

="=SUM(A1:A2) "&SUM(A1:A2)

Or, for separate cells you could have the formula in cell A3:

=SUM(A1:A2)

And in another cell use this UDF to return the formula as a TEXT string:

Function GetFormula(cell_ref As Range) As String
If cell_ref.HasFormula Then
GetFormula = cell_ref.Formula
Else
GetFormula = ""
End If
End Function

Copy the code above and paste into a general module. Then to use it:

=GetFormula(A3)

--
Biff
Microsoft Excel MVP


"raj kd" wrote in message
...
hi
how can 1 show a formula and its resultant value in same cell or 2
different cells?
e.g. If a1=1 & a2= 2 and my formula a3=SUM(a1:a2), i would like to
see both formula SUM(a1:a2) & its resultant value which is 3 in this
case, either in 1 cell or 2 different cells.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default showing formula and its value simultaneously

If you don't mind toggling back and forth between them, you can press Ctrl+`
(that symbol with the Ctrl key is the back-apostrophe found on the same key
as the tilde {~}). The column widths may vary as you toggle back and
forth... the best strategy I have found is to select a cell you are
interested in following so you can more easily spot it as it moves with the
column width changes.

Rick


"raj kd" wrote in message
...
hi
how can 1 show a formula and its resultant value in same cell or 2
different cells?
e.g. If a1=1 & a2= 2 and my formula a3=SUM(a1:a2), i would like to
see both formula SUM(a1:a2) & its resultant value which is 3 in this
case, either in 1 cell or 2 different cells.


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 SHOWING AS #### AVRIL Excel Worksheet Functions 6 February 4th 09 09:46 PM
Showing Top 30 with array-formula? [email protected] Excel Worksheet Functions 20 July 1st 07 05:33 PM
FORMULA NOT SHOWING VALUE Nenagh Excel Discussion (Misc queries) 1 May 28th 07 01:01 AM
Formula Showing Zero instead of nothing Abode Excel Discussion (Misc queries) 3 May 10th 06 10:07 PM
Sum Formula Showing Instead of Value :( Carla Excel Discussion (Misc queries) 3 November 22nd 05 08:06 PM


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

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

About Us

"It's about Microsoft Excel"