+ Reply to Thread
Results 1 to 2 of 2

Separating Bold from After-Bold Parts of Cell Strings

Hybrid View

  1. #1
    Registered User
    Join Date
    06-14-2011
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2003
    Posts
    81

    Separating Bold from After-Bold Parts of Cell Strings

    Hello!

    I'm wondering how I could achieve this: extracting the bold part of a string as well as the non-bold part that follows it, and pasting each to a different column in another worksheet. The source is on Sheet2. The result is on Sheet1.

    Thank you!

    ML
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Separating Bold from After-Bold Parts of Cell Strings

    Hi try this

    Sub aa()
    Dim x&
    Dim c As Range
    For Each c In Columns(1).SpecialCells(2)
    For x = 1 To Len(c)
        If c.Characters(x, 1).Font.Bold = True Then
            c.Offset(, 1) = c.Offset(, 1) & Mid(c, x, 1)
            Else:
            c.Offset(, 2) = c.Offset(, 2) & Mid(c, x, 1)
        End If
        Next
        Next
    End Sub
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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