Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Concatenate and Bold

I have a formula in a cell: CONCATENATE($F$3;" ";"[";ROUND
(F4;);"%";"]";" ";"| ")

I would like to put the cell F3 in bold, but can't figure out how to
do it.

When I select the word, the "bold" icon is greyed out.

Is it possible to do this?


Thanks in advance,

Pedro
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Concatenate and Bold

Hi Pedro,
If you mean within the formula, is not possible, the bold is grey out
because you are editing the formula

if this helps please click yes thanks

"Pedro Costa" wrote:

I have a formula in a cell: CONCATENATE($F$3;" ";"[";ROUND
(F4;);"%";"]";" ";"| ")

I would like to put the cell F3 in bold, but can't figure out how to
do it.

When I select the word, the "bold" icon is greyed out.

Is it possible to do this?


Thanks in advance,

Pedro

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Concatenate and Bold

On Thu, 30 Jul 2009 09:41:19 -0700 (PDT), Pedro Costa wrote:

I have a formula in a cell: CONCATENATE($F$3;" ";"[";ROUND
(F4;);"%";"]";" ";"| ")

I would like to put the cell F3 in bold, but can't figure out how to
do it.

When I select the word, the "bold" icon is greyed out.

Is it possible to do this?


Thanks in advance,

Pedro


If I understand you correctly, you want to concatenate several items, and want
only the portion of the concatenation that comes from F3 to be bolded, with the
rest of the string in a normal font.

You cannot do that with the results of a formula or function. You can only
"differentially format" a text string.

One solution would be to use a VBA macro to perform the concatenation, then
write the resulting text string to a cell and differentially format that.

To enter this Macro (Sub), <alt-F11 opens the Visual Basic Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select Insert/Module and
paste the code below into the window that opens.

To use this Macro (Sub), <alt-F8 opens the macro dialog box. Select the macro
by name, and <RUN.

You'll probably need to do some editing. And I also note that some of your
"tokens" could be combined into a single string. But maybe you have a reason
for doing it the way you had written.

========================
Option Explicit
Sub Foo()
Dim rg1 As Range, rg2 As Range
Dim rDest As Range
Dim s As String

Set rg1 = Range("F3")
Set rg2 = Range("F4")
Set rDest = Range("G2")

s = rg1.Value & " " & "[" & _
Application.WorksheetFunction.Round( _
rg2.Value, 0) & "%" & "]" & " " & "| "

With rDest
.Clear
.Value = s
.Characters(1, Len(rg1.Value)).Font.Bold = True
End With
End Sub
=========================
--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Concatenate and Bold

On Jul 30, 6:08*pm, Ron Rosenfeld wrote:
On Thu, 30 Jul 2009 09:41:19 -0700 (PDT), Pedro Costa wrote:
I have a formula in a cell: CONCATENATE($F$3;" ";"[";ROUND
(F4;);"%";"]";" ";"| ")


I would like to put the cell F3 in bold, but can't figure out how to
do it.


When I select the word, the "bold" icon is greyed out.


Is it possible to do this?


Thanks in advance,


Pedro


If I understand you correctly, you want to concatenate several items, and want
only the portion of the concatenation that comes from F3 to be bolded, with the
rest of the string in a normal font.

You cannot do that with the results of a formula or function. *You can only
"differentially format" a text string.

One solution would be to use a VBA macro to perform the concatenation, then
write the resulting text string to a cell and differentially format that.

To enter this Macro (Sub), <alt-F11 opens the Visual Basic Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select Insert/Module and
paste the code below into the window that opens.

To use this Macro (Sub), <alt-F8 opens the macro dialog box. Select the macro
by name, and <RUN.

You'll probably need to do some editing. *And I also note that some of your
"tokens" could be combined into a single string. *But maybe you have a reason
for doing it the way you had written.

========================
Option Explicit
Sub Foo()
Dim rg1 As Range, rg2 As Range
Dim rDest As Range
Dim s As String

Set rg1 = Range("F3")
Set rg2 = Range("F4")
Set rDest = Range("G2")

s = rg1.Value & " " & "[" & _
Application.WorksheetFunction.Round( _
* * rg2.Value, 0) & "%" & "]" & " " & "| "

With rDest
* * .Clear
* * .Value = s
* * .Characters(1, Len(rg1.Value)).Font.Bold = True
End With
End Sub
=========================
--ron


Thank you all for your help.

I will do this through VBA.

Best regards,


Pedro
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alphabetically list of last names: BOLD, not bold Lerner Excel Discussion (Misc queries) 16 March 1st 09 07:46 PM
Alphabetically list of names BOLD and NOT bold Lerner Excel Discussion (Misc queries) 13 March 1st 09 02:37 PM
How do I bold face text1 but not others in a concatenate string? Jennifer Excel Discussion (Misc queries) 1 August 7th 08 12:31 PM
Concatenate 2 cells, and have one cell value display as bold? Pierre Excel Worksheet Functions 3 April 26th 07 02:04 PM
Join bold and non-bold text in one cell bkincaid Excel Discussion (Misc queries) 3 March 21st 06 12:58 AM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"