Showing Comment If...

  • I am working on a file where I need to show a comment IF "Show Breakdown" is selected from a validation list in cell D5.

    I am having lots of problems with this. Can anyone help?


  • Try this out:

    Make a copy of your workbook to do this test.

    In the copy, let's assume the cell in which you want the comment to show is B5. Make sure there is a comment in cell B5, or this will generate an error.

    Open the Visual Basic Editor: ALT+F11

    Copy and paste the code provided below

    Close the Visual Basic Editor: ALT+F11

    Save the code (click the save tool)

    Now chnage the contents of cell D5.

    Is that basically what you wanted?

    Far Farley
    The professional Network
    Atlanta, Georgia


    Private Sub Worksheet_Change(ByVal Target As Range)

    If Range("D5").Value = "SHOW BREAKDOWN" Then
    Range("B5").Comment.Visible = True
    Range("B5").Comment.Visible = False
    End If

    End Sub

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!