Results 1 to 20 of 31

Thread: Show a Formula in Another Cell

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #24
    MS Excel MVP VBAX Regular Ken Wright's Avatar
    Joined
    Jun 2004
    Posts
    17
    Location
    The other option would be to write a comment to every cell containing a formula, and then display the comment. This then gives you an easy option to switch on and off using view/comments. Gets a bit messy with lots of contiguous cells with formulas, but no more so than anything else.

    Sub Formulas() 
    Dim cel As Range
    On Error Resume Next
    Application.ScreenUpdating = False
    For Each cel In ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas, 23)
        With cel
            .AddComment
            .Comment.Visible = True
            .Comment.Text Text:=.Formula
        End With
    Next cel
    Application.ScreenUpdating = True
    End Sub

    Regards
    Ken.....................
    Last edited by Ken Wright; 06-19-2004 at 01:30 PM. Reason: Spelling error
    It's easier to beg forgiveness than ask permission

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •