How to filter cells by bold characters in Excel?
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.
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.
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!
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.
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:
Best Office Productivity Tools
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...
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!