+ Reply to Thread
Results 1 to 3 of 3

How to add " as a character to Substitute function

  1. #1
    Registered User
    Join Date
    02-07-2019
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    21

    How to add " as a character to Substitute function

    Hi,
    I am trying to run a simple Substitute
    Substitute this: <p>
    with this: <p dir="ltr" style="text-align: left;">

    Excel doesn't accept it as is, I assume it's because the Substitute text has " as part of it.

    I've tried:
    =SUBSTITUTE(A2,"<p>",<p dir="ltr" style="text-align: left;">)
    =SUBSTITUTE(O2,"<p>","<p dir="ltr" style="text-align: left;">")

    Any idea for a workaround?

    thanks
    Last edited by Zivhodiva; 03-17-2020 at 08:07 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: How to add " as a character to Substitute function

    Hi Zivhodiva,

    If you have a quote in the replace string, make the (") a double quote ("") and see what happens.
    https://stackoverflow.com/questions/...titute-formula
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-07-2019
    Location
    New York
    MS-Off Ver
    Office 365
    Posts
    21

    Re: How to add " as a character to Substitute function

    Works!!

    Thanks MarvinP

+ 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. [SOLVED] Indirect "Substitute(Substitute(" not working for multiple spaces
    By Ochimus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2018, 04:01 PM
  2. [SOLVED] IF Function if 13th character equals "A"
    By jessiebelle1980 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-22-2014, 06:54 AM
  3. [SOLVED] "IF" function that only requires partial accuracy or contains a character
    By ReallyCoolGuyYeah in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-03-2013, 07:24 PM
  4. Multiple Character Substitute Formula
    By IanE78 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-01-2012, 11:02 AM
  5. Using the "substitute" function
    By maacmaac in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-18-2007, 08:52 AM
  6. Replies: 5
    Last Post: 06-26-2006, 09:23 PM

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