Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Two formats within one cell

I know that Excel will allow separate formatting of data within a cell
(i.e. "37715CCC", where the numbers ("37715") are "blue" & "bold" and
the letters ("CCC") are "black", "bold" & "italic") ., but is there a
way (VBA) of going thru a selection of cells, finding the letters,
make them "blue" & "bold" and the numbers "black", "bold" & "italic".?
I'm just trying to make the alphanumeric data easier to read (you know
distinguishing "O" from "0").
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Two formats within one cell

Hi
Try the following code. It only works for cells with the formats:
<numbers<characters
but that's a starting point.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Jo Ke" wrote:

I know that Excel will allow separate formatting of data within a cell
(i.e. "37715CCC", where the numbers ("37715") are "blue" & "bold" and
the letters ("CCC") are "black", "bold" & "italic") ., but is there a
way (VBA) of going thru a selection of cells, finding the letters,
make them "blue" & "bold" and the numbers "black", "bold" & "italic".?
I'm just trying to make the alphanumeric data easier to read (you know
distinguishing "O" from "0").

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Two formats within one cell

From vba help index for CHARACTERS

With Worksheets("Sheet1").Range("B1")
.Value = "New Title"
.Characters(5, 5).Font.Bold = True
..Characters(15, 5).Font.colorindex=5
End With


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jo Ke" wrote in message
...
I know that Excel will allow separate formatting of data within a cell
(i.e. "37715CCC", where the numbers ("37715") are "blue" & "bold" and
the letters ("CCC") are "black", "bold" & "italic") ., but is there a
way (VBA) of going thru a selection of cells, finding the letters,
make them "blue" & "bold" and the numbers "black", "bold" & "italic".?
I'm just trying to make the alphanumeric data easier to read (you know
distinguishing "O" from "0").


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
Copying formats - column widths, formats, outlining to worksheets DavidBr318 Excel Worksheet Functions 4 August 14th 09 05:03 AM
Inheriting cell formats when using absolute cell references DJFudd Excel Discussion (Misc queries) 1 July 22nd 09 12:35 PM
cell formats Tomcat690 Excel Worksheet Functions 2 June 1st 09 12:32 PM
Copy and link formats from cell to cell Kathrine J Wathne Excel Discussion (Misc queries) 0 June 15th 06 03:54 PM
Formats: Too many different cell formats error message [email protected] Excel Programming 3 February 1st 05 01:34 AM


All times are GMT +1. The time now is 05:28 AM.

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

About Us

"It's about Microsoft Excel"