+ Reply to Thread
Results 1 to 5 of 5

Replace Macro for Excel - HTML with Double Quotes Issue

  1. #1
    Registered User
    Join Date
    06-29-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    2

    Replace Macro for Excel - HTML with Double Quotes Issue

    Here's one that I'm sure will be uber-easy for you real vba-ers.

    I'm writing a macro to clean-up HTML in an Excel file. I need to remove the tag <p class="MsoNormal"> and replace it with <p>. Here's the code I have:

    Cells.Replace What:="<p class=Chr$(34)MsoNormalChr$(34)>", Replacement:="<p>", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False

    But, naturally, it's not working. How do I represent the double quotes in the code so the paragraph tag can be removed?

  2. #2
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Replace Macro for Excel - HTML with Double Quotes Issue

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Replace Macro for Excel - HTML with Double Quotes Issue

    Double quotes allow you to use quotes in a string

  4. #4
    Registered User
    Join Date
    06-29-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Replace Macro for Excel - HTML with Double Quotes Issue

    Quote Originally Posted by GaidenFocus View Post
    Please Login or Register  to view this content.
    Perfect! Thank you so much

  5. #5
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Replace Macro for Excel - HTML with Double Quotes Issue

    No problemo! Add me some rep for some reason i have -15! =P

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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