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.
Method 1: Extract Bold Text via Find and Replace Function
Step 1: Press Ctrl+F to trigger Find and Replace dialog.
Step 2: Click ‘Options>>’ button to get more settings, then click Format.
Step 3: On Find Format window, click Font tab, under Font style select Bold, then click OK.
Step 4: 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.
Step 5: 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.
Step 6: Close Find and Replace dialog. Then you can copy them and paste them to another range.
Method 2: Extract Bold Text via VBA Macro
Step 1: 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.
Step 2: 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
Step 3: Save the macro. And then quit Microsoft Visual Basic for Applications.
Step 4: In C2 apply the new function ‘ExtractBold’ we just created . Enter formula =ExtractBold(A2).
Step 5: Press Enter and verify that nothing is returned, that’s because ‘NPS001’ is not in bold.
Step 6: 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.
Step 7: 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.