In our daily work we may mark some texts in bold to make them to be noticed clearly. And if we want to extract them from original list, we need to know the ways to find them and then move them to another range. This free tutorial will introduce you two ways to extract bold texts, the first one is to extract bold texts via Find and Replace function, the second one is to edit VBA Macro.
See screenshot below. Some texts are marked in bold.
Table of Contents
1. Extract Bold Text via Find and Replace Function
Step1: Press Ctrl+F to trigger Find and Replace dialog.
Step2: Click ‘Options>>’ button to get more settings, then click Format.
Step3: On Find Format window, click Font tab, under Font style select Bold, then click OK.
Step4: After clicking OK, go back to Find and Replace dialog, click Find All to load all matched values. All bold texts are displayed, you can drag the scrollbar to check all of them.
Step5: Press Ctrl+A on one of the loaded results, then all values are selected.
At the same time, bold text cells are also selected on original table.
Step6: Close Find and Replace dialog. Then you can copy them and paste them to another range.
2. Extract Bold Text via VBA Macro
Step1: On current visible worksheet, right click on sheet name tab to load Sheet management menu. Select View Code, Microsoft Visual Basic for Applications window pops up.
Or you can enter Microsoft Visual Basic for Applications window via Developer->Visual Basic. You can also press Alt + F11 keys simultaneously to open it.
Step2: In Microsoft Visual Basic for Applications window, click Insert->Module, enter below code in Module1. In this step we define a new function ‘ExtractBold’.
Function ExtractBold(SelectRng As Range) If SelectRng.Font.Bold Then ExtractBold = SelectRng.Value Else ExtractBold = "" End If End Function
Step3: Save the macro. And then quit Microsoft Visual Basic for Applications.
Step4: In C2 apply the new function ‘ExtractBold’ we just created . Enter formula =ExtractBold(A2).
Step5: Press Enter and verify that nothing is returned, that’s because ‘NPS001’ is not in bold.
Step6: Drag the fill handle down to the end. Verify that bold texts in original table are extracted. But they are not displayed in bold after extracting.
Step7: Apply ExtractBold function in D column to extract bold texts from column B. Now all bold texts are extracted. You can select all of them and mark them in bold after extracting them per your demand.
3. Video: Extract Bold Text from A List in Excel
This video will show you how to extract bold text from a list in Excel using both the Find and Replace feature and VBA code.