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 / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Change color of characters in a cell based of a cell reference

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kimbobo - 22 Mar 2008 00:31 GMT
Hi All,

Does anyone know how to change the color of characters in a cell based
of a cell reference.

For example, cell A1 = "||||||||||" (contains 10 "|") I want the first
4 "|" to be Red and the second 6 to Blue. Based of cells A2 = 4 and A3
= 6.

Any ideas?

Thanks!!

-Kim
Dave Peterson - 22 Mar 2008 01:33 GMT
Check your other post.

> Hi All,
>
[quoted text clipped - 10 lines]
>
> -Kim

Signature

Dave Peterson

Gord Dibben - 22 Mar 2008 02:57 GMT
Sub CellFont()
Dim rng1, rng2 As Integer
rng1 = Range("A2").Value
rng2 = Range("A3").Value
   With ActiveCell.Characters(Start:=1, Length:=rng1).Font
       .ColorIndex = 3
   End With
   With ActiveCell.Characters(Start:=rng1 + 1, Length:=rng2).Font
    .ColorIndex = 5
   End With
End Sub

Gord Dibben  MS Excel MVP

>Hi All,
>
[quoted text clipped - 10 lines]
>
>-Kim

Rate this thread:






 
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.