Sep 01 2024 01:05 PM
Hi, just wondering if anyone knows how to find / select all cells with bold numbers in a column? I've tried using find and replace many times. If I do it again and it tells me it "can't find" what im looking for, I will punch holes through both of my monitors. Please help.
Sep 01 2024 01:56 PM
Excel's "Find and Replace" feature does not natively support searching for cell formatting like bold text. However, you can use a simple VBA (Visual Basic for Applications) macro to find and select all bold cells in a column.
Here’s how to do it:
Using VBA to Find and Select Bold Cells
1. Open the VBA Editor
2. Copy and Paste the VBA Code
Vba Code is untested backup your file. VBA is not supported if you use Excel Online.
Example in the attached file.
Sub SelectBoldCells()
Dim rng As Range
Dim cell As Range
Dim boldCells As Range
' Define the range you want to search in
Set rng = Range("A1:A100") ' Adjust this range according to your needs
For Each cell In rng
' Check if the cell's font is bold
If cell.Font.Bold Then
' If this is the first bold cell found, set boldCells to it
If boldCells Is Nothing Then
Set boldCells = cell
Else
' If more bold cells are found, add them to the range
Set boldCells = Union(boldCells, cell)
End If
End If
Next cell
' If any bold cells were found, select them
If Not boldCells Is Nothing Then
boldCells.Select
Else
MsgBox "No bold cells found in the specified range."
End If
End Sub
3. Run the Macro
Alternative: Conditional Formatting Trick (Without VBA)
If you're not comfortable with VBA, here's a workaround using conditional formatting:
This isn't as straightforward as the VBA approach, but it can be a workaround if you prefer not to use macros. The text and steps were edited with the help of AI.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and Like it!
This will help all forum participants.