Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is it possible to have more than one format for a text string in a cell?
For example, I have the formula: =i_currency&TEXT(+$C$13/landarea,"#,###.##")&"/"&landunit,"") How can I bold or italicize part of the text string? thanks George |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can't bold or italicize (or do any other font formatting to) part of a
string of text if that text is displayed as the result of a worksheet formula... only text constants can have parts of its text formatted differently from the rest. -- Rick (MVP - Excel) "mopgcw" wrote in message ... Is it possible to have more than one format for a text string in a cell? For example, I have the formula: =i_currency&TEXT(+$C$13/landarea,"#,###.##")&"/"&landunit,"") How can I bold or italicize part of the text string? thanks George |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks, how would I format part of a text constant?
"Rick Rothstein" wrote: You can't bold or italicize (or do any other font formatting to) part of a string of text if that text is displayed as the result of a worksheet formula... only text constants can have parts of its text formatted differently from the rest. -- Rick (MVP - Excel) "mopgcw" wrote in message ... Is it possible to have more than one format for a text string in a cell? For example, I have the formula: =i_currency&TEXT(+$C$13/landarea,"#,###.##")&"/"&landunit,"") How can I bold or italicize part of the text string? thanks George |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If your text constant is abcdefghj, in the formula bar select the def, then
Format Cells will give you a font tab. Select the desired formatting, and that will be applied to the def. -- David Biddulph "mopgcw" wrote in message ... Thanks, how would I format part of a text constant? "Rick Rothstein" wrote: You can't bold or italicize (or do any other font formatting to) part of a string of text if that text is displayed as the result of a worksheet formula... only text constants can have parts of its text formatted differently from the rest. -- Rick (MVP - Excel) "mopgcw" wrote in message ... Is it possible to have more than one format for a text string in a cell? For example, I have the formula: =i_currency&TEXT(+$C$13/landarea,"#,###.##")&"/"&landunit,"") How can I bold or italicize part of the text string? thanks George |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Enter the text "Some bold and red words" in A1 and then give this code a
try... Sub Test() Dim R As Range Dim Word As String Dim Position As Long Set R = Range("A1") ' Clear any exiting font formatting R.Characters.Font.Bold = False R.Characters.Font.ColorIndex = xlAutomatic ' Make a word bold Word = "Bold" Position = InStr(1, R.Value, Word, vbTextCompare) R.Characters(Position, Len(Word)).Font.Bold = True ' Make the color of a word red Word = "red" Position = InStr(1, R.Value, Word, vbTextCompare) R.Characters(Position, Len(Word)).Font.ColorIndex = 3 End Sub -- Rick (MVP - Excel) "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... If your text constant is abcdefghj, in the formula bar select the def, then Format Cells will give you a font tab. Select the desired formatting, and that will be applied to the def. -- David Biddulph "mopgcw" wrote in message ... Thanks, how would I format part of a text constant? "Rick Rothstein" wrote: You can't bold or italicize (or do any other font formatting to) part of a string of text if that text is displayed as the result of a worksheet formula... only text constants can have parts of its text formatted differently from the rest. -- Rick (MVP - Excel) "mopgcw" wrote in message ... Is it possible to have more than one format for a text string in a cell? For example, I have the formula: =i_currency&TEXT(+$C$13/landarea,"#,###.##")&"/"&landunit,"") How can I bold or italicize part of the text string? thanks George |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
David & Rick
THANKS, this was VERY helpful. That's why this is such a great forum. Take care, George "Rick Rothstein" wrote: Enter the text "Some bold and red words" in A1 and then give this code a try... Sub Test() Dim R As Range Dim Word As String Dim Position As Long Set R = Range("A1") ' Clear any exiting font formatting R.Characters.Font.Bold = False R.Characters.Font.ColorIndex = xlAutomatic ' Make a word bold Word = "Bold" Position = InStr(1, R.Value, Word, vbTextCompare) R.Characters(Position, Len(Word)).Font.Bold = True ' Make the color of a word red Word = "red" Position = InStr(1, R.Value, Word, vbTextCompare) R.Characters(Position, Len(Word)).Font.ColorIndex = 3 End Sub -- Rick (MVP - Excel) "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... If your text constant is abcdefghj, in the formula bar select the def, then Format Cells will give you a font tab. Select the desired formatting, and that will be applied to the def. -- David Biddulph "mopgcw" wrote in message ... Thanks, how would I format part of a text constant? "Rick Rothstein" wrote: You can't bold or italicize (or do any other font formatting to) part of a string of text if that text is displayed as the result of a worksheet formula... only text constants can have parts of its text formatted differently from the rest. -- Rick (MVP - Excel) "mopgcw" wrote in message ... Is it possible to have more than one format for a text string in a cell? For example, I have the formula: =i_currency&TEXT(+$C$13/landarea,"#,###.##")&"/"&landunit,"") How can I bold or italicize part of the text string? thanks George |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple formats in a single cell with multiple formulas | Excel Worksheet Functions | |||
The Cell formats keep changing itself from text to date | Excel Discussion (Misc queries) | |||
How do I keep cell color formats separate from text during A-Z sor | Excel Worksheet Functions | |||
Multiple formats for a single cell value. | Excel Worksheet Functions | |||
single text cells combines in new text cell | Excel Discussion (Misc queries) |