Skip to main content

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


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.


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.

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 300 handy functions, makes your jobs more easier. 

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:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and 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!
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations