Results 1 to 4 of 4

Counting Effected terms

Threaded View

  1. #1
    Registered User
    Join Date
    04-16-2015
    Location
    Salt Lake City
    MS-Off Ver
    2013
    Posts
    7

    Question Counting Effected terms

    I am using the following macro
    Sub test()
        Dim r As Range, m As Object
        With CreateObject("VBScript.RegExp")
            .Global = True: .IgnoreCase = True
            .Pattern = "\b(eye|pain|irritation)\b"
            For Each r In Range("a1", Range("a" & Rows.Count).End(xlUp))
                For Each m In .Execute(r.Value)
                    With r.Characters(m.firstindex + 1, m.Length).Font
                        .Bold = True: .Color = vbRed
                    End With
                Next
            Next
        End With
    End Sub
    to tag words within cells with certain colors, it works great. Is there a way to have a separate column showing the # of 'terms' that were tagged?
    Example, if the word 'eye' appears in a cell 13 times, a separate column would show a 13
    Last edited by Leith Ross; 05-28-2015 at 11:52 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 01-26-2015, 04:42 PM
  2. Replies: 3
    Last Post: 06-09-2012, 11:18 PM
  3. Replies: 9
    Last Post: 11-03-2010, 11:42 AM
  4. Replies: 0
    Last Post: 02-15-2006, 05:00 PM
  5. Counting Time Values in Terms of Hourly Increments
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-25-2005, 05:51 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