Solved how to bold text in an excel formula

April 27, 2011 at 13:21:34
Specs: Windows XP
I would like to Bold text that is inside a formula while running Excel 2007. Here is the formula.

="Upon receipt by the undersigned for a check from XYZ in the sum of "&DOLLAR('G702'!E28,2)&" payable to "&'G702'!C13&" and when the check has been properly endorsed and has been paid by the bank upon which it is drawn, this document shall become effective to release any mechanic’s lien, stop notice or right the undersigned has on the job of "&'G702'!E3&" located at "&'G702'!E5&" to the following extent. This release covers a progress payment for labor, services, equipment or materials furnished to "&'G702'!C3&" through "&TEXT('G702'!I9, "mmmm dd, yyyy")&" only and does not cover any retention or items furnished after said date. Before any recipient of this document relies on it, said recipient should verify evidence of payment to the undersigned."


See More: how to bold text in an excel formula

Report •


✔ Best Answer
May 2, 2011 at 18:24:44
As far as I know, it can't be done in a single cell without VBA and even then it would be troublesome.

The Characters object, which can be used to set the font style for specific characters in a cell that contains a text string, will not recognize text within a formula.

Not only won't it recognize the value returned by the DOLLAR function, it won't even recognize the text in your "sentence" because it's not really text. The cell contains a formula that returns the text within the quotes; it doesn't really contain the text itself.

So, in order for VBA to bold just the characters returned by the DOLLAR function, it would first have to convert the entire cell to Text via Copy...Paste Special...Values, then determine where the characters returned by the DOLLAR function start and end and then bold just those characters.

It's doable, but you would lose your formula, which might not be a problem if the you are using is a template. Open the template that contains the formula, enter your values, run the macro and then save the sheet under a different name.

Of course, none of that matters since you don't want to use VBA.

The only other option I can think of is to split your formula into multiple cells so that the DOLLAR function is in a cell by itself. Once that is done, you can simply bold that cell.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.



#1
April 27, 2011 at 16:36:53
So format the cell as Bold.

(Why do I suspect that there is more to this question than there appears?)

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
April 27, 2011 at 18:24:35
Because the formatting does not follow when the cell is accessed.

Try this, in cell A1 enter the word TEST
Bold, Italicize, and Underline it.

In cell B1 enter =A1 and all you get is the word TEST, no formatting.

I believe a Macro will be necessary.

MIKE

http://www.skeptic.com/


Report •

#3
April 28, 2011 at 04:15:41
Mike,

I'm not sure I see your point.

The OP didn't say he was putting text in a cell and then using a formula to reference the cell with the text in it.

He posted a formula that already contains text concatenated with values from other cells. If I bold the cell that contains the formula, all of the text and the values from the referenced cells are bolded.

I think I'll wait until the OP gives us some more details.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
April 28, 2011 at 12:36:17
If I bold the cell that contains the formula, all of the text and the values from the referenced cells are bolded.

Not in mine.

Try this, in cell A1 enter the word TEST
now Bold cell A1.

Now in cell B1 enter the formula:

="This should be bold >"&A1&"< but is it?"

On mine the string from A1 will not appear as Bold in B1, all formatting is removed.

MIKE

http://www.skeptic.com/


Report •

#5
April 28, 2011 at 14:31:28
We're probably just wasting time since only the OP can tell us what he is trying to do.

What you are saying is true, but that is not how I read the OP's post nor what I was suggesting.

The OP said: I would like to Bold text that is inside a formula while running Excel 2007. Here is the formula.

He said "Here is the formula". To me, that means that the text he wants to bold is inside the formula he posted.

If I bold the cell that contains the formula (the long one that he posted) the text inside the formula, as well as the data brought in from the cells referenced in the formula, are bolded.

I don't see how you interpreted his post to mean that he has bold values in other cells and he wants them brought into his formula as bold. Maybe he does, but he certainly didn't say that in his post.

If the OP comes back and says "I want the values returned from 'G702'!C13, 'G702'!I9, etc. to be bolded but all of the other text should not be.", then we can address that issue.

However, at this point, I don't have any idea what he wants bolded because all he said was "I would like to Bold text that is inside a formula" and then posted "the formula", one which contains an awful lot of text.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#6
April 29, 2011 at 14:52:51
Thanks for but does not work. It is possible that I was not clear on the post

Report •

#7
April 29, 2011 at 14:53:33
I believe you are correct. But how do I write that macro

Report •

#8
April 29, 2011 at 16:07:31
re: "It is possible that I was not clear on the post"

It's not just possible, it's obvious! ;-)

The problem is, you still haven't told us what you are trying to accomplish.

You haven't clear anything up, so it's kind of hard to offer any kind of a specific suggestion.

Exactly what is it that you are trying to bold?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#9
May 2, 2011 at 17:53:52
Good afternoon everyone, I would like to thank everyone for trying to solve the problem. I apologize for not responding in a timely manner. I have been traveling rather extensively.

Sorry that my original post was not clear. I am trying to bold only the "Dollar Amount" and not the text in the formula.

I would like not to use VBA to avoid macro security

Again thanks to everyone for trying to help.


Report •

#10
May 2, 2011 at 18:24:44
✔ Best Answer
As far as I know, it can't be done in a single cell without VBA and even then it would be troublesome.

The Characters object, which can be used to set the font style for specific characters in a cell that contains a text string, will not recognize text within a formula.

Not only won't it recognize the value returned by the DOLLAR function, it won't even recognize the text in your "sentence" because it's not really text. The cell contains a formula that returns the text within the quotes; it doesn't really contain the text itself.

So, in order for VBA to bold just the characters returned by the DOLLAR function, it would first have to convert the entire cell to Text via Copy...Paste Special...Values, then determine where the characters returned by the DOLLAR function start and end and then bold just those characters.

It's doable, but you would lose your formula, which might not be a problem if the you are using is a template. Open the template that contains the formula, enter your values, run the macro and then save the sheet under a different name.

Of course, none of that matters since you don't want to use VBA.

The only other option I can think of is to split your formula into multiple cells so that the DOLLAR function is in a cell by itself. Once that is done, you can simply bold that cell.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#11
May 16, 2011 at 13:23:35
Ok, well I certainly appreciate everyone's effort to help solve this issue

Report •

Ask Question