Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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) | |||
How do I bold face text1 but not others in a concatenate string? | Excel Discussion (Misc queries) | |||
Concatenate 2 cells, and have one cell value display as bold? | Excel Worksheet Functions | |||
Join bold and non-bold text in one cell | Excel Discussion (Misc queries) |