Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David McRitchie
 
Posts: n/a
Default

I guess you mean only shows the cell references *within* the formula,

If you had used defined names in the formula you would have seen those defined names in the formula..
If you had cell addresses in the formula you would see those cell addresses.

If you are trying go get an address changed to a defined name that is impossible,
because you could have a lot of different name that include a single cell.

Show FORMULA or FORMAT of another cell
http://www.mvps.org/dmcritchie/excel/formula.htm


"srinivasan" wrote in message news:1EBC6DD2-5BA1-49E3-969F-
Continuation of my query, I have another one. Even though the code
perfectly reproduces the formula contained in the cell it only shows the cell
reference of the formula. But I have given a name for the cell and the said
name is not displayed but the cell reference (row & col no) only has been
displayed. Is it possible to amend the formula /code to make it display the
exact contents of the formula (name given to the cell) rather than the cell
reference wherever the formula contains names. i.e instead of =L122*L119/1000
the formula should show -26.93*_36347/1000


















range address?

Third, according the XL VBA help, NoteText returns at the most 255
characters at a time. It is the developer's responsibility to loop and
(re)create the complete note.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article .com,
says...
I've a workbook containing this function. Download my
Excel_Calendar.xls from:
http://www.pvv.org/~nsaa/excel.html#21

I've named it ShowFormula:
=ShowFormula(A1)

In the same manner I've made a function showing the note in a Cell
=NoteShow(A1)

The Functions
Public Function ShowFormula(ByRef rngCell As Range) As String
'************************************************* *****************************
'
' Macro ShowFormula created 2004-08-13 by Nikolai Sandved
)
'
' Description: This Function returns the Formula in the input Cell
rngCell as
' text
'
' Input:
' rngCell - A cell
'
' Output
' RankStatistical - Formula in the input Cell rngCell as text
'
'************************************************* *****************************

'** Error Control
On Error GoTo ErrorHandle

ShowFormula = rngCell.Formula

Exit Function

ErrorHandle:
'** Set the return error objects
MsgBox ("Error code:" & CStr(Err) & Chr(13) & Chr(13) _
& "Further Description: " & Error$ & Chr(13) _
& "In Custom function ShowFormula")
End Function


Public Function NoteShow(ByRef rngCell As Range) As String
'************************************************* *****************************
'
' Macro NoteShow created 2004-06-21 by Nikolai Sandved )
'
' Description: This Function returns the Note in the input Cell rngCell
'
' Input:
' rngCell - A cell Range
'
' Output
' ShowNote - Returns the Note as text from the Cell reference given
'
'************************************************* *****************************

'** Error Control
On Error GoTo ErrorHandle

'** Define variables
Dim wbm As Workbook 'The active workbook
Dim wsWithNote As Worksheet 'The worksheet with the Note
Dim strWorkbookName As String 'The Workbook with the Note

'** Declare variables
strWorkbookName = Mid(rngCell.Address(1, 1, 1, 1), _
InStr(rngCell.Address(1, 1, 1, 1), "[") + 1, _
InStrRev(rngCell.Address(1, 1, 1, 1), "]") - _
InStr(rngCell.Address(1, 1, 1, 1), "[") - 1)
Set wbm = Workbooks(strWorkbookName)
Set wsWithNote = wbm.Sheets(rngCell.Worksheet.Name)

NoteShow =
Application.WorksheetFunction.Clean(wsWithNote.Ran ge(rngCell.Address).NoteText)

'Cleans
Set wsWithNote = Nothing
Set wbm = Nothing

Exit Function

ErrorHandle:
'** Set the return error objects
MsgBox ("Error code:" & CStr(Err) & Chr(13) & Chr(13) _
& "Further Description: " & Error$ & Chr(13) _
& "In Custom function NoteShow")

'Cleans
Set wsWithNote = Nothing
Set wbm = Nothing

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
I have problems keeping the merge formula to use as a template. PBrunner Excel Discussion (Misc queries) 2 June 20th 05 10:45 PM
Using contents of a cell in a formula Mike Excel Discussion (Misc queries) 4 June 9th 05 03:10 AM
Formula to return cell contents based on multiple conditions Bill Excel Worksheet Functions 3 January 19th 05 09:59 AM
Cell shows formula and not the result of the formula. stumpy1220 Excel Worksheet Functions 2 January 14th 05 05:11 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


All times are GMT +1. The time now is 12:20 AM.

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"