Results 1 to 14 of 14

Removing HTML tags (specifically <p> tags)

Threaded View

  1. #1
    Registered User
    Join Date
    07-02-2015
    Location
    San Gabriel, California
    MS-Off Ver
    2002
    Posts
    11

    Removing HTML tags (specifically <p> tags)

    Hi!


    I'm new here. This would be my first post. I am in dire need of some help with removing HTML tags from a CSV file. I have about 3600 entries to modify. I used:

    Sub RemoveTags()
    Dim r As Range
    Selection.NumberFormat = "@"  'set cells to text numberformat
    With CreateObject("vbscript.regexp")
      .Pattern = "\<.*?\>"
      .Global = True
      For Each r In Selection
        r.Value = .Replace(r.Value, "")
      Next r
    End With
    End Sub
    But that left me with about 880 entries with:

    <p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal">
    I also tried find and replace using <*> for find and a empty replace field but I get the "Formula is too long" error message.


    I'm pretty new to VBA so any help is appreciated!

    Cross posted here!
    Last edited by furiousbob; 07-02-2015 at 05:51 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Removing HTML tags (specifically <p> tags)
    By furiousbob in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2015, 05:40 PM
  2. [SOLVED] Removing HTML tags (specifically <p> tags)
    By furiousbob in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2015, 05:40 PM
  3. [SOLVED] Removing HTML tags from a spreadsheet from data obtained through a database query
    By Excelfail in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2014, 12:35 AM
  4. convert formated excel column to html source text with html tags
    By julia81 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-19-2011, 04:22 PM
  5. Removing HTML tags from cells
    By rochdalemark in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-22-2005, 06:09 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