Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In a "normal" cell, I've been able to go in and change the font
color/bold/etc. for several characters in the cell as desired. I'm trying to do the same thing programmatically for a cell with 1000's of characters and it's not working. I've tried it manually as well with no success. Is there a limit on the number of characters in a cell before this no longer works? Thanks, Barb Reinhardt |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Probably 1024 which is the limit you can see or print.
32,767 can be entered in a cell but with above limits. Gord Dibben MS Excel MVP On Thu, 3 Jul 2008 12:20:02 -0700, Barb Reinhardt wrote: In a "normal" cell, I've been able to go in and change the font color/bold/etc. for several characters in the cell as desired. I'm trying to do the same thing programmatically for a cell with 1000's of characters and it's not working. I've tried it manually as well with no success. Is there a limit on the number of characters in a cell before this no longer works? Thanks, Barb Reinhardt |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Thu, 3 Jul 2008 12:20:02 -0700, Barb Reinhardt
wrote: In a "normal" cell, I've been able to go in and change the font color/bold/etc. for several characters in the cell as desired. I'm trying to do the same thing programmatically for a cell with 1000's of characters and it's not working. I've tried it manually as well with no success. Is there a limit on the number of characters in a cell before this no longer works? Thanks, Barb Reinhardt Excel 2007: I just created a cell with 7000 characters and was able to manually change some characters near the beginning to BOLD, and some others to RED/BOLD/ITALIC. I then ran this macro and it behaved as expected: ========================= Sub foo() Dim c As Range Set c = Range("H1") With c .Font.Bold = False .Font.Italic = False .Font.Color = vbBlack .Characters(10, 5).Font.Bold = True .Characters(100, 20).Font.Bold = True .Characters(100, 20).Font.Color = vbRed .Characters(100, 20).Font.Italic = True End With End Sub ============================== --ron |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ron
How does it behave when you change the 100 to 3000? Gord On Thu, 03 Jul 2008 16:44:45 -0400, Ron Rosenfeld wrote: On Thu, 3 Jul 2008 12:20:02 -0700, Barb Reinhardt wrote: In a "normal" cell, I've been able to go in and change the font color/bold/etc. for several characters in the cell as desired. I'm trying to do the same thing programmatically for a cell with 1000's of characters and it's not working. I've tried it manually as well with no success. Is there a limit on the number of characters in a cell before this no longer works? Thanks, Barb Reinhardt Excel 2007: I just created a cell with 7000 characters and was able to manually change some characters near the beginning to BOLD, and some others to RED/BOLD/ITALIC. I then ran this macro and it behaved as expected: ========================= Sub foo() Dim c As Range Set c = Range("H1") With c .Font.Bold = False .Font.Italic = False .Font.Color = vbBlack .Characters(10, 5).Font.Bold = True .Characters(100, 20).Font.Bold = True .Characters(100, 20).Font.Color = vbRed .Characters(100, 20).Font.Italic = True End With End Sub ============================== --ron |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Thu, 03 Jul 2008 14:17:09 -0700, Gord Dibben <gorddibbATshawDOTca wrote:
Ron How does it behave when you change the 100 to 3000? Gord It seems to behave as expected. At least with Excel 2007, there are circumstances under which I can see all 7000 characters in the cell. (I didn't count to ensure the red/bold/italic started at 3000, but it looks about right, and is 20 characters long). --ron |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Ron
Not using 2007 puts me at a disadvantage and leaves me open to possibly misleading statements. Gord On Thu, 03 Jul 2008 17:36:51 -0400, Ron Rosenfeld wrote: On Thu, 03 Jul 2008 14:17:09 -0700, Gord Dibben <gorddibbATshawDOTca wrote: Ron How does it behave when you change the 100 to 3000? Gord It seems to behave as expected. At least with Excel 2007, there are circumstances under which I can see all 7000 characters in the cell. (I didn't count to ensure the red/bold/italic started at 3000, but it looks about right, and is 20 characters long). --ron |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Thu, 03 Jul 2008 15:01:31 -0700, Gord Dibben <gorddibbATshawDOTca wrote:
Thanks Ron Not using 2007 puts me at a disadvantage and leaves me open to possibly misleading statements. Gord The specifications still indicate: Total number of characters that a cell can contain 32,767 characters but I don't see a separate listing for the number of characters that can be displayed. --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reg. Change of font color in a cell | Excel Worksheet Functions | |||
Change font color in cell | Excel Discussion (Misc queries) | |||
When I change the font size in a cell the value changes. | Excel Worksheet Functions | |||
How do I change the number of characters per cell? | Setting up and Configuration of Excel | |||
Can't change cell value with unusual font. | Excel Worksheet Functions |