Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find and Replacing Characters in a Formula

    Is there an easy way to replace a cell reference in different formulae for another cell reference.

    ie replace cell reference c1 with cd1 in 10 different formulae in a worksheet.

    I have tried find and replace but when the formula contains the sum function and the cell reference was su* it replaced the values and made the formula invalid

    for example sum(s1+b1+c1) to be (d1+b1+c1) and

  2. #2
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Find and Replacing Characters in a Formula

    For that kind of find and replace, you'll need to do it in 3 steps.
    First replace sum with another nonsense string - you know something like ##$$!!
    Then do your replacement.
    Then change ##$$!! back to sum.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Find and Replacing Characters in a Formula

    or, depending on your formula, include some of the characters adjacent to the target to make the search string more unique, such as:

    Search charcters: +su
    Replace characters: +du

    won't trash sum() formulas unless they read =...+sum()

    Be creative with adjacent characters.
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

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