Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

Two formats within one cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jo Ke - 29 Nov 2007 16:51 GMT
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").
sebastienm - 29 Nov 2007 17:26 GMT
Hi
Try the following code. It only works for cells with the formats:
    <numbers><characters>
but that's a starting point.
Signature

Regards,
Sébastien
<http://www.ondemandanalysis.com>

> I know that Excel will allow separate formatting of data within a cell
> (i.e. "37715CCC", where the numbers ("37715") are "blue" & "bold" and
[quoted text clipped - 3 lines]
> I'm just trying to make the alphanumeric data easier to read (you know
> distinguishing "O" from "0").
Don Guillett - 29 Nov 2007 17:53 GMT
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

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

>I know that Excel will allow separate formatting of data within a cell
> (i.e. "37715CCC", where the numbers ("37715") are "blue" & "bold" and
[quoted text clipped - 3 lines]
> I'm just trying to make the alphanumeric data easier to read (you know
> distinguishing "O" from "0").
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.