Skip to main content

How to filter cells by bold characters in Excel?

Author: Kelly Last Modified: 2020-05-21

You can apply the bold font style to format the data or contents in cells in Excel, but do you know how to filter cells by the cells which containing bold font style in Excel? This article collects several tricky VBA macros to filter cells by bold characters in Excel.

Filter bold cells with the helper column
Filter bold cells with the VBA code
Easily filter bold cells with an amazing tool
More tutorials for data filtering…


Filter bold cells with the help column

Supposing you need to filter all bold cells in column B as below screenshot shown, please do as follows:

The below user-defined function helps to identify whether a cell in a column is bold or not, and then return the results as TRUE or False in a helper column. You can filter all TRUE results to display only the bold cells in column B.

1. Press the Alt + F11 keys to open the Microsoft Visual Basic for Application window.

2. In the Microsoft Visual Basic for Application window, click Insert > Module, then copy the following VBA code into the Module window. See screenshot:

VBA code: Filter cells by bold characters

Function IsBold(rCell As Range)
IsBold = rCell.Font.Bold
End Function

3. Press the Alt + Q keys to close the code window.

4. Select a blank cell which is adjacent to the table (the selected cell should locate on the same row of the first row in the filter table), copy the below formula into it and press the enter key.

=IsBold(B2)

5. Keep selecting the first result cell, and drag the Fill Handle to get all results. See screenshot:

6. Select the header of the helper column, click Data > Filter. Click the arrow button besides the header cell, check the TRUE box only, and then click OK.

Now all bold cells in column B are filtered out as below screenshot shown.


Quickly filter bold cells in a column with several clicks in Excel:

The Filter Bold cells utility of Kutools for Excel can help you quickly filter all bold cells in a certain column with several clicks as the below demo shown.
Download the full feature 30-day free trail of Kutools for Excel now!


Filter bold cells with the VBA code

The below VBA code allows you to filter all bold cells in one column directly. Please do as follows.

1. Select the column range you will filter out all bold cells except the header cell. In this case, I select B2:B16.

2. Press the Alt + F11 keys to open the Microsoft Visual Basic for Application window.

3. In the Microsoft Visual Basic for Application window, click Insert > Module, then copy and paste the following VBA code into the Module window.

VBA code: Filter bold cells in a column

Sub FilterBold()
'Updated by Extendoffice 20191018
Dim cell As Range
For Each cell In Selection
If cell.Font.Bold = False Then
cell.EntireRow.Hidden = True
End If
Next cell
End Sub

4. Press the F5 key to run this macro. Then all bold cells are filtered out in selected column range immediately.


Easily filter bold cells with an amazing tool

In this section, we are recommend you a handy tool – the Filter Bold cells utility of Kutools for Excel. With this utility, all bold cells in selected column are filtered immediately with several clicks.

Before applying Kutools for Excel, please download and install it firstly.

1. Select the column range you will filter the bold cells, click Kutools Plus> Special Filter > Filter Bold to get it done. See below demo:

  If you want to have a free trial (30-day) of this utility, please click to download it, and then go to apply the operation according above steps.


Related articles

Filter multiple columns simultaneously in Excel
After filtering one column with the Filter feature, only AND criteria can be applied to more than one column. In this case, how could you apply both the AND and OR criteria to filter multiple columns simultaneously in Excel worksheet? Methods in this article can do you a favor.

Filter or select cells by cell color in Excel
Normally you can fill cells with different colors for any purposes in Excel. If you have a worksheet with using different colors to indicate different type of contents and you want to filter or select those cells by the cell color, you may get it done with the methods in this article.

Paste skipping hidden/filtered cells and rows in Excel
For example, you have filtered a table in Excel, but now you need to copy a range and paste into this filtered table, do you know how to paste skipping the hidden/filtered cells and rows? Several easy ways in this article can help you.

Filter rows based on a list selection in another sheet
In Excel, we usually filter rows based on a criteria, but if there are two list, one is in Sheet1, and another in Sheet2, could you have any tricks to quickly filter rows in Sheet1 based on the list in Sheet2? Here this article introduces the ways on solving this job.

Filter all related data from merged cells in Excel
Supposing there is a column of merged cells in your data range, and now, you need to filter this column with merged cells to show all the rows which are related with each merged cell as following screenshots shown. In excel, the Filter feature allows you to filter only the first item which associated with the merged cells, in this article, we are talking about how to filter all related data from merged cells in Excel.

More tutorials for data filtering…

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 (16)
Rated 4.5 out of 5 · 2 ratings
This comment was minimized by the moderator on the site
Thanks for sharing, it works wonderful, thank you!
Rated 4.5 out of 5
This comment was minimized by the moderator on the site
Thanks for the formula..it helped
Rated 4.5 out of 5
This comment was minimized by the moderator on the site
I've used this technique and had an issue when trying to copy the bold data. It only copies some of the data for some reason. Is there any way of copying only the bold data using this technique? Thanks, Richard
This comment was minimized by the moderator on the site
Dear richard skins,



We didn't encounter the problem as you mentioned. Would you please provide a screenshot with details of your operation?



Thank you for your comment!
This comment was minimized by the moderator on the site
Hi, I'm a complete excel novice, i've done the following technique but now need to copy the data which is bold/true. When I have tried to do this is won't copy what is highlighted. Any ideas on how I can copy the data? Thanks, Richard
This comment was minimized by the moderator on the site
@RICHARD Can u please provide any screenshot of your spreadsheet showing what u are exactly trying to do?
This comment was minimized by the moderator on the site
Thanks for sharing. It works wonderful.
This comment was minimized by the moderator on the site
Hi I am using this code and its working fine but whenever I click on cancel the dialogue box a popup window appear and shows some error. Can you please tell me how to remove that error. :Sub FilterBold() Dim myRange As Range Set myRange = Application.InputBox(Prompt:="Please Select a Range", Title:="InputBox Method", Type:=8) myRange.Select Application.ScreenUpdating = False For Each myRange In Selection If myRange.Font.Bold = False Then myRange.EntireRow.Hidden = True End If Next myRange Application.ScreenUpdating = True End Sub
This comment was minimized by the moderator on the site
Dear Nitin Jain,

Sorry to reply so late!

We have found the proble and fixed it already. The VBA script in the article is now updated,

Thank you for your comment!
This comment was minimized by the moderator on the site
Simple and brilliant, thank you!
This comment was minimized by the moderator on the site
This worked perfectly, thank you!!! :D :lol:
This comment was minimized by the moderator on the site
I presume that column A is the reference Column with Bold cells. I create a Name "Bold?" with the refer to as below =GET.CELL(20,OFFSET(INDIRECT("A1"),ROW()-1,0)) In column B, I type: =Bold? Copy down the formula and then use autofilter to filter the value TRUE. DONE
This comment was minimized by the moderator on the site
@cadafi ur formula works fine but it is not the optimised or efficient use of it. Rather we should use direct reference of the range or a cell in place of that complete offset command. Like the one as follows: =GET.CELL(20,'Sheet1'!A1) Copy down the formula and then use autofilter to filter the value TRUE. DONE
This comment was minimized by the moderator on the site
Thanks Mohamand Faizan. You are entirely correct.
This comment was minimized by the moderator on the site
@Mohammad Faizan You are entirely correct. Thanks.
This comment was minimized by the moderator on the site
@Cadafi.... thats brilliant... wondering how it works though!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations