If you have Kutools for Excel installed, you can apply the Select Cells with Format utility to quickly find out the underlined texts in a range of a whole worksheet. If you just want to find out one type of underlined texts in a specific range, this VBA code cannot help you, but you can use below handy tool to solve this task in this case. Click OK, then a dialog will pop out to tell you which cells are single underlined texts, and which are double underlined texts. And a dialog pops out for select a range to find underlined texts.Ĥ. If xAddress2 "" Then Result = Result & "Double underline address:" & vbCr & xAddress2ģ. If xAddress1 "" Then Result = "Single underline address:" & vbCr & xAddress1 & vbCr & vbCr XAddress2 = xAddress2 & ", " & Rg1.Address If Rg1.Characters(I, 1).Font.Underline = xlUnderlineStyleDouble Then XAddress1 = xAddress1 & ", " & Rg1.Address If Rg1.Characters(I, 1).Font.Underline = xlUnderlineStyleSingle Then Set Rg = Rg.SpecialCells(xlCellTypeConstants) Set Rg = Application.InputBox("Please select a range:", "Kutools for Excel", xAddress,, ,, , 8) Sub SearchForUnderline()ĭim xAddress As String, xAddress1 As String, xAddress2 As String VBA: Find all underlined text in a worksheet.
In the popping Module window, paste below VBA code. Press Alt + F11 keys to open Microsoft Visual Basic for Applications window, and click Insert > Module.Ģ. In Excel, you cannot use Go To Special function to find out the underlined texts, so I introduce a VBA code to help you find all underlined texts in a worksheet.ġ. Supposing you have a range of data in a worksheet, and some of the data is with underline, and now you want to find out these data with underline, how can you quickly find out them? Here I introduce some tricks for you to quickly find out the underlined texts in a range or whole worksheet in Excel.įind all underlined texts in a worksheet with VBAįind all underlined texts in a range or worksheet with Kutools for Excel
How to find all underlined texts in a range or whole worksheet in Excel?