Forum Discussion

anthonyjb's avatar
anthonyjb
Copper Contributor
May 24, 2019

New Line Break within a cell

Is there a way to show Line Break symbol and other hidden characters in a cell similar to how Word does?

3 Replies

  • anthonyjb's avatar
    anthonyjb
    Copper Contributor

    Thanks for the suggestions.  Microsoft needs to make that an option like do in Word instead of me writing custom formulas to find these hidden items.

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    anthonyjb , nope, not such way.

     

    As workaround you may apply conditional formatting to highlight entire cell with non-printable characters with the rule like =A1<>CLEAN(A1)

  • anthonyjb 

    Hi,

    ok i didn't know such a function, but the following macro color all cells in selection with Line breaks.

     

    Sub ColorLineBreak()
    Dim rngCell As Range

    For Each rngCell In Selection

    If InStr(rngCell.Text, vbLf) > 0 Then
    rngCell.Interior.ColorIndex = 3
    End If

    Next rngCell


    End Sub

     

    Best regards 

    Bernd

    http://www.vba-Tanker.com