Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to remove cells or rows if not bold in Excel?

Supposing you have a range of data with bolded cells and not bolded cells as below screenshot shown, now what you need is to remove the cells or rows if not bolded. Instead of removing not bolded cells one by one manually, this tutorial introduces the tricks for you to quickly solve it in Excel.

doc remove if not bold 1

Remove rows if not bolded with VBA

Remove cells if not bolded with Find and Replace and Select Range Helper

Remove rows/cells if not bold with Kutools for Excel good idea3

Enable you to do smarter, faster and better

Kutools - the best office productivity tool brings 300 advanced features to Excel. Details... Download...

Office Tab - brings tabbed interface to Excel and Word, make your work much easier. Details...Download...


v Remove rows if not bolded with VBA

To remove rows if not bolded, you can use a VBA code to handle.

1. Press F11 + Alt keys to enable the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, then pasted below VBA code to the new Module window.

VBA: Remove rows if not bolded.

Sub DeleteNonBolded()
'UpdatebyKutoolsforExcel20151116
    Dim xRg As Range
    Dim xDelRg As Range
    Dim xAddress As String
    Dim xUpdate As Boolean
    Dim I As Long
    Dim xBold As Variant
    On Error Resume Next
    xAddress = Application.ActiveWindow.RangeSelection.Address
    Set xRg = Application.InputBox("Select a range", "Kutools for Excel", xAddress, , , , , 8)
    Set xRg = Application.Intersect(xRg, ActiveSheet.UsedRange)
    If xRg Is Nothing Then Exit Sub
    If xRg.Areas.Count > 1 Then
        MsgBox "This VBA cannot support multiple range", , "Kutools for Excel"
        Exit Sub
    End If
    xUpdate = Application.ScreenUpdating
    Application.ScreenUpdating = False
    For I = 1 To xRg.Rows.Count
        xBold = xRg.Rows(I).Cells.Font.Bold
        If TypeName(xBold) = "Boolean" Then
            If xBold = False Then
                If xDelRg Is Nothing Then
                    Set xDelRg = xRg.Rows(I).EntireRow
                Else
                    Set xDelRg = Union(xRg.Rows(I).EntireRow, xDelRg)
                End If
            End If
        End If
    Next
    xDelRg.Delete
    Application.ScreenUpdating = xUpdate
End Sub

3. Press F5 key to run the VBA code. In the popping up Kutools for Excel dialog box, please specify the range you will remove rows without bold cells, and click the OK button.

doc remove if not bold 2

And then you can see the rows which doesn’t contain bolded cells have been removed

doc remove if not bold 1doc arrow rightdoc remove if not bold 3

Note: the rows can be removed only when all cells in the same row are not bolded.

formula Never need to worry about long long formulas in Excel anymore! Kutools for Excel's Auto Text can add all formulas to a group
as auto text, and liberate your brain! Click here to know Auto Text     Click here to get free trial

Remove cells if not bolded with Find and Replace and Select Range Helper

If you just want to remove the cell contents from not bolded cells, you can use Find and Replace function to select the bolded cells first, then use Kutools for Excel’s Select Range Helper to reverse selecting the not bolded cells, then remove the contents.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

1. Select the data range where you want to remove not bolded cells, and press Ctrl + F to enable Find and Replace dialog, and click at Options button. See screenshot:

doc remove if not bold 4

2. Click Format to go to the Find Format dialog, and under Font tab, select Bold from the Font style list. See screenshot:

doc remove if not bold 5

3. Click OK > Find All, and all the bolded cells are listing in the Find and Replace dialog, and press Ctrl +A to select all of them, then close the Find and Replace dialog. See screenshot:

doc remove if not bold 6

4. Then keep these cells selected and click Kutools > Select > Select Range Helper. See screenshot:

doc remove if not bold 7

5. In the popping dialog, check Inverse Selection option firstly, and then select the original data range. Now you can see the selection are reversed. See screenshot:

doc remove if not bold 8

6. Click Close. Now press Delete key to remove the cell contents from the not bolded cells.

doc remove if not bold 9


Remove rows/cells if not bold with Kutools for Excel

Above methods are not easy enough, in this case, you can use Kutools for Excel’s Select Cells with Format utility to quickly identify not bolded cells, and then remove them.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After free installing Kutools for Excel, please do as below:

1. Select the data range you need, and click Kutools > Select > Select Cells with Format. See screenshot:

doc remove if not bold 15

2. In the popping dialog, click Choose Format From Cell button to select one not bolded cell form the data range, then check Bold only from the below list in Font section. See screenshot:

doc remove if not bold 11

3. Click Ok, and a dialog pops out to remind you the number of selected cells, just click Yes to close it.

doc remove if not bold 12

Now all the not bolded cells are selected, and press Delete key to remove the cell contents. Or if you want to remove the not bolded rows, right click any one of selected cells and select Delete > Entire row. See screenshots:

doc remove if not bold 13doc arrow rightdoc remove if not bold 14

Relative Articles:



Excel Productivity Tools

Kutools for Excel - The Best Office Productivity Tool

  • Brings 300 powerful advanced features to Excel, enable you to do smarter, faster and better.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Office Tab - brings tabbed interface to Office, make your work much easier.

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.