Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bold some of the cell contents
Thanks for taking the time to read my question.
It is possible to apply the Bold font setting to an entire cell. It is also possible to apply the Bold setting to portions of text in a cell and leave the remaining portions unbolded (if that's a word...). How can you do that in VBA? Ex: Activecell.value = "The Number Is 550055" I want "550055" to be bold, and the rest not bold. How do I do this in VBA? Thanks, Brad |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bold some of the cell contents
ActiveCell.Characters(15,6).Font.Bold = True
worked for me. -- Regards, Tom Ogilvy "Brad" wrote in message ... Thanks for taking the time to read my question. It is possible to apply the Bold font setting to an entire cell. It is also possible to apply the Bold setting to portions of text in a cell and leave the remaining portions unbolded (if that's a word...). How can you do that in VBA? Ex: Activecell.value = "The Number Is 550055" I want "550055" to be bold, and the rest not bold. How do I do this in VBA? Thanks, Brad |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bold some of the cell contents
one way:
Const sPREFIX = "The Number Is " With ActiveCell .Value = sPREFIX & 550055 .Characters(Len(sPREFIX) + 1).Font.Bold = True End With In article , "Brad" wrote: Thanks for taking the time to read my question. It is possible to apply the Bold font setting to an entire cell. It is also possible to apply the Bold setting to portions of text in a cell and leave the remaining portions unbolded (if that's a word...). How can you do that in VBA? Ex: Activecell.value = "The Number Is 550055" I want "550055" to be bold, and the rest not bold. How do I do this in VBA? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bold some of the cell contents
Try something like
Dim Pos As Integer ActiveCell.Value = "The number is 123" Pos = InStrRev(ActiveCell.Value, " ") ActiveCell.Characters(Pos + 1, 999).Font.Bold = True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Brad" wrote in message ... Thanks for taking the time to read my question. It is possible to apply the Bold font setting to an entire cell. It is also possible to apply the Bold setting to portions of text in a cell and leave the remaining portions unbolded (if that's a word...). How can you do that in VBA? Ex: Activecell.value = "The Number Is 550055" I want "550055" to be bold, and the rest not bold. How do I do this in VBA? Thanks, Brad |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bold some of the cell contents
Perfect Tom!
Thanks, Brad "Tom Ogilvy" wrote: ActiveCell.Characters(15,6).Font.Bold = True worked for me. -- Regards, Tom Ogilvy "Brad" wrote in message ... Thanks for taking the time to read my question. It is possible to apply the Bold font setting to an entire cell. It is also possible to apply the Bold setting to portions of text in a cell and leave the remaining portions unbolded (if that's a word...). How can you do that in VBA? Ex: Activecell.value = "The Number Is 550055" I want "550055" to be bold, and the rest not bold. How do I do this in VBA? Thanks, Brad |
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) | |||
Add only cells whose contents are in "Bold" | Excel Discussion (Misc queries) | |||
change cell contents to bold | Excel Worksheet Functions | |||
Join bold and non-bold text in one cell | Excel Discussion (Misc queries) |