Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA for SELECTING ONLY BOLD CELL
Could one please devise a simple code which would be selecting cells with a
Bold format within a range. In other words: For each cell in selection. Thanx. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA for SELECTING ONLY BOLD CELL
Hi,
Try this Sub Select_Bold() Dim BoldRange As Range For Each c In ActiveSheet.UsedRange If c.Font.Bold Then If BoldRange Is Nothing Then Set BoldRange = c Else Set BoldRange = Union(BoldRange, c) End If End If Next If Not BoldRange Is Nothing Then BoldRange.Select End If End Sub Mike "FARAZ QURESHI" wrote: Could one please devise a simple code which would be selecting cells with a Bold format within a range. In other words: For each cell in selection. Thanx. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA for SELECTING ONLY BOLD CELL
Hi
For Each c In ActiveSheet.UsedRange can be replaced with For Each c In Selection Mike "Mike H" wrote: Hi, Try this Sub Select_Bold() Dim BoldRange As Range For Each c In ActiveSheet.UsedRange If c.Font.Bold Then If BoldRange Is Nothing Then Set BoldRange = c Else Set BoldRange = Union(BoldRange, c) End If End If Next If Not BoldRange Is Nothing Then BoldRange.Select End If End Sub Mike "FARAZ QURESHI" wrote: Could one please devise a simple code which would be selecting cells with a Bold format within a range. In other words: For each cell in selection. Thanx. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA for SELECTING ONLY BOLD CELL
Xclent intro to UNION statement. However, how to select all kinds of
underline cells?, i.e. even single/double accounting or simple underlines? Thanx again "Mike H" wrote: Hi For Each c In ActiveSheet.UsedRange can be replaced with For Each c In Selection Mike "Mike H" wrote: Hi, Try this Sub Select_Bold() Dim BoldRange As Range For Each c In ActiveSheet.UsedRange If c.Font.Bold Then If BoldRange Is Nothing Then Set BoldRange = c Else Set BoldRange = Union(BoldRange, c) End If End If Next If Not BoldRange Is Nothing Then BoldRange.Select End If End Sub Mike "FARAZ QURESHI" wrote: Could one please devise a simple code which would be selecting cells with a Bold format within a range. In other words: For each cell in selection. Thanx. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Alphabetically list of last names: BOLD, not bold | Excel Discussion (Misc queries) | |||
Alphabetically list of names BOLD and NOT bold | Excel Discussion (Misc queries) | |||
Bold in a cell | Excel Discussion (Misc queries) | |||
Join bold and non-bold text in one cell | Excel Discussion (Misc queries) | |||
How can i test a cell for bold style in a cell (Excel 2003)? | Excel Worksheet Functions |