+ Reply to Thread
Results 1 to 7 of 7

Find and replace not working for apostrophe

  1. #1
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    196

    Find and replace not working for apostrophe

    Hi all. I did a find and replace to change the equal sign (=) to the word "highlight". That was so I could email the file to another person and they could reverse it so the formulas were correct at their end instead of trying to find linked workbooks on my computer. At the other end I did the opposite and did find and replace to change "highlight" to an = sign. It worked on some but not all formulas. In a pretty large number it did the replacement and added an apostrophe ' in front of it which means the formula is now text. I tried F&R to just remove the apostrophe and it won't do it. There are still about 20K formulas to fix so line editing isn't really a good option.

    I am sort of baffled as I can't think of anything I did wrong. Any insights or advice would be really appreciated.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,970

    Re: Find and replace not working for apostrophe

    The apostrophe is a reserved character and won't be seen. Try using the PIPE symbol instead in your initial find and replace (assuming it's not used in any of your formulae.

    Characters to avoid are the wildcards * and ~ and any type of inverted commas.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    196

    Re: Find and replace not working for apostrophe

    OK. I am really about to pull out my hair. I realized I didn't put up an example or anything.

    '=IF($P$2=TRUE,XLOOKUP(A9,'[USER FILE.xlsb]SUPERMARKET'!A:A,'[USER FILE.xlsb]SUPERMARKET'!AC:AC,0),MAX(XLOOKUP(A9,'[USER FILE.xlsb]SUPERMARKET'!A:A,XLOOKUP(B6,'[USER FILE.xlsb]SUPERMARKET'!B2:AE2,'[USER FILE.xlsb]SUPERMARKET'!B:AE)),ROUNDUP(XLOOKUP(A9,Usage!B:B,Usage!P:P,0),0)))

    I need to get that leading apostrophe out. There are about 20K variations of that formula that have the leading apostrophe.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,970

    Re: Find and replace not working for apostrophe

    Did you read my post?

  5. #5
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    196

    Re: Find and replace not working for apostrophe

    Yes Ma'am. The issue is that I already did the initial find and replace. I tried using | instead of a word but when I tried to replace | with = what I got was '= anyway. It's my own fault for not making a copy of the file first and thus preserving one that wasn't messed up.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Find and replace not working for apostrophe

    Select the column(s) containing the formulae, one at a time.

    Data/Text to columns/Delimited/Finish
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Registered User
    Join Date
    06-09-2022
    Location
    Jakarta
    MS-Off Ver
    365
    Posts
    1

    Re: Find and replace not working for apostrophe

    Quote Originally Posted by Glenn Kennedy View Post
    Select the column(s) containing the formulae, one at a time.

    Data/Text to columns/Delimited/Finish
    This solution work great! Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find and Replace not working
    By jbclem in forum Excel General
    Replies: 4
    Last Post: 05-21-2021, 10:46 PM
  2. [SOLVED] Need UDF to Replace Quotation marks and apostrophe's
    By RDA Di in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-16-2020, 08:52 AM
  3. find and replace not working
    By kitbit in forum Excel General
    Replies: 25
    Last Post: 04-01-2019, 12:08 AM
  4. Find and replace not working
    By ammartino44 in forum Excel General
    Replies: 4
    Last Post: 08-25-2015, 12:36 PM
  5. VBA Find-Replace Not Working
    By 13gentj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2015, 08:18 PM
  6. [SOLVED] Find & Replace Not Working in VBA
    By jazzy1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2012, 06:18 PM
  7. [SOLVED] FIND and REPLACE ' apostrophe
    By James T in forum Excel General
    Replies: 3
    Last Post: 06-09-2006, 02:00 AM

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