Display properties
Select the cells and then run this macro:
Sub CommentThem()
Dim cell As Range
On Error Resume Next
Selection.ClearComments
On Error GoTo 0
For Each cell In Intersect(Selection, ActiveSheet.UsedRange)
If cell.Formula <> "" Then
cell.AddComment
cell.Comment.Visible = False
On Error Resume Next 'fails on invalid formula
cell.Comment.Text Text:=" Address: " & cell.Address(0, 0) & Chr(10) & _
" Value: " & cell.Value & Chr(10) & _
" Format: " & cell.NumberFormat & Chr(10) & _
" Formula: " & cell.Formula
On Error GoTo 0
End If
Next cell
End Sub
by David McRitchie
Also:
Show FORMULA of another cell in Excel
See all Topics
No comments:
Post a Comment