+ Reply to Thread
Results 1 to 3 of 3

Find and Replace in the Comment Field

  1. #1
    Richcarvel
    Guest

    Find and Replace in the Comment Field

    I know how to find a string in a comment field, but I can't seem to find a
    way to do a Find and Replace inside a comment field. Does anyone know how?

  2. #2
    Chip Pearson
    Guest

    Re: Find and Replace in the Comment Field

    Try

    Dim CMT As Comment
    Set CMT = Range("A1").Comment
    CMT.Text Text:=Replace(CMT.Text, "test", "another test")


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Richcarvel" <[email protected]> wrote in
    message
    news:[email protected]...
    >I know how to find a string in a comment field, but I can't seem
    >to find a
    > way to do a Find and Replace inside a comment field. Does
    > anyone know how?




  3. #3
    Richcarvel
    Guest

    Re: Find and Replace in the Comment Field

    Thanks, Chip. Forgive my ignorance of VB. That code replaced one instance
    of the text in the spreadsheet, how do I get them all? Thanks. Rich

    "Chip Pearson" wrote:

    > Try
    >
    > Dim CMT As Comment
    > Set CMT = Range("A1").Comment
    > CMT.Text Text:=Replace(CMT.Text, "test", "another test")
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    > "Richcarvel" <[email protected]> wrote in
    > message
    > news:[email protected]...
    > >I know how to find a string in a comment field, but I can't seem
    > >to find a
    > > way to do a Find and Replace inside a comment field. Does
    > > anyone know how?

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1