Function for BOLD format
Please, is there any function in Excel for BOLD format?
I have a formula like this...
="There are "&B10&" users in the room now!"
I want only the "number of users (B10)" in BOLD format, so I'd like to know if there's a function to do that. It would be something like this...
="There are "&BOLD(B10)&" users in the room now!"
If there's not, how could I create this function in VBA?
A friend of mine told me it's impossible to do. But, wouldn't it be the same process of the functions UPPER(range) and LOWER(range)? I mean, if it's possible to deal with upper or lower cases using functions, maybe it's possible to deal with bold format as well, ain't it? Am I wrong?
When the value of a cell is a text, it's possible to put bold format only for the words we want, instead of putting for the (entire) cell intself. But when the cell has a formula, that's not possible anymore. That's why I thought about a function.
Is it really impossible?
Thanks for the attention, guys.
Last edited by brunces; 07-13-2005 at 06:53 AM.
Reason: Edited for addtional comments.
Hmm.....I don't know if it can be done the exact way you want it, and I don't know which cell is supposed to say "There are a x number of users in the room now!" but here's a sample.
Private Sub Worksheet_Calculate()
Dim r As Range
Dim r2 As Range
Set r = Range("B10")
Set r2 = Range("C10")
Application.EnableEvents = False
r.Offset(, 1).Value = "There are " & r.Value & " users in the room now!"
.Characters(InStr(r2.Value, r), Len(CStr(r))).Font.FontStyle = "Bold"
Application.EnableEvents = True
and do you know a way to do this while the cell to format actually contains a formula? Because here at EE (http://oldlook.experts-exchange.com:..._21489800.html) this does not seem so.
What I've got above is the only thing I have ever been able to come up with as a workaround to this question.
I have not come up with any rational ideas as to how to go about changing formatting within a formula. Most resposnes on the boards from MrExcel, etc.. say it cannot be done, and I am pretty much going to mark it as impossible.
I have attempted custom number formats, etc.. but never spent a lot of time it because it just does not seem possible or even if, reliable.
Now that that is said, someone will post and prove me wrong.
MVP (Excel 2008-2010)
"Provide sample data and layout if you want a quicker solution." - MD
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'