Consulting

Results 1 to 4 of 4

Thread: vba to find and replace exact matches of cell value in a sheet

  1. #1
    VBAX Regular
    Joined
    Dec 2012
    Posts
    55
    Location

    vba to find and replace exact matches of cell value in a sheet

    Hi

    I trying to write a macro to find and replace only the exact matches in a sheet.

    Example:

    The sheet contains cell values like 1.01.test value, 1.1.02.test value, and most of cells value will be "."

    Now i want to clear only the "." dots in the sheets but don't want to delete the dots in 1.01. or 1.1.02. etc.

    Any help will be really great.

    Best
    Rem0

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,645
    [VBA]cells.replace ".","",xlwhole[/VBA]

  3. #3
    VBAX Regular
    Joined
    Dec 2012
    Posts
    55
    Location
    Hi

    Many Thanks!

    You Rocked.

    Best
    Rem0

  4. #4
    VBAX Regular
    Joined
    Oct 2013
    Posts
    27
    Location
    @snb Fantastic. It is mind-boggling to see all exact match cells in a Sheet are replaced with the desired string while the partial match cells are not modified.

Posting Permissions

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