Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Oct 2001
    San Bernardino, California, USA
    Thanked 0 Times in 0 Posts

    Only concatenate bold text (97, 2003)

    I am trying to concatenate some text from different cells. Specifically, A1 has some text and B1 has some text. I would like to concatenate the text from A1 and the BOLD text from B1.

    Sort of like =A1& C1(bold part)

    Is there a means of doing this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Only concatenate bold text (97, 2003)

    It would be far easier if you stored the bold part in a separate cell.
    If you really want to use the bold parf of a cell, you need VBA code to extract it. You can use this custom function:

    Function GetBold(oCell As Range) As String
    Dim i As Integer
    Dim j As Integer
    Dim n As Integer
    n = Len(oCell.Text)
    i = 1
    Do While oCell.Characters(i, 1).Font.Bold = False And i <= n
    i = i + 1
    j = i
    Do While oCell.Characters(j, 1).Font.Bold = True And j <= n
    j = j + 1
    GetBold = oCell.Characters(i, j - i).Text
    End Function

    The formula would be =A1&GetBold(B1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts