Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JV JV is offline
external usenet poster
 
Posts: 22
Default Showing Formula

Hello

I have a cell calculate based on info from other cells. How do I make the
cell show the formula when selected instead of the hardcoded result?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Showing Formula

Hi JV.
Try:

Public Function MyValue(aCell As Range) As Variant
by Norman Jones in m.p.i.o.e
Dim myVal As Variant
myVal = Replace(aCell.Formula, Application. _
International(xlDecimalSeparator), ".")
myVal = Evaluate(myVal)
If IsError(myVal) Then
MyValue = CVErr(xlErrNA)
Else
MyValue = myVal
End If
End Function

in A1: D1+E1*F1-10
in B1: =MyValue(A1)

Regards
Eliano

"JV" wrote:

Hello

I have a cell calculate based on info from other cells. How do I make the
cell show the formula when selected instead of the hardcoded result?

Thanks in advance.

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 in cell rather than answer for formula Debby New Users to Excel 1 May 7th 10 12:05 AM
How to fix my spreadsheet from showing formula to showing answer SimplyQuick Excel Discussion (Misc queries) 4 October 7th 08 10:00 PM
How to fix my spreadsheet from showing formula to showing answer SimplyQuick Excel Discussion (Misc queries) 0 October 7th 08 06:38 PM
Formula Showing Zero instead of nothing Abode Excel Discussion (Misc queries) 3 May 10th 06 10:07 PM
formula not showing up Nicole Seibert Excel Programming 6 March 18th 06 12:35 AM


All times are GMT +1. The time now is 04:34 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"