Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to color characters REG, GREEN, YELLOW in the same cell?

I have seen the VB code that will count cells with a specific color.
I have seen the VB code that will set the font color of all characters in a
cell.
What is the VB code that sets the colour of individual characters in a cell?
For example:
What is the VB code to set 5 characters GREEN,
2 characters YELLOW and 3 characters RED in the same cell?

Why would I want to do this?...

I have 10 project deliverable tasks grouped with the summary task at the
top. Each deliverable task has a status colour assigned (GREEN, YELLOW,
RED). The group summary line has a status cell filled with 10 # characters.
Each # character is to be coloured the colour of one of the 10 deliverable
task's status. This results in what looks like a colour bar showing the
status of all the tasks in the group.

Now, I manually count the number of GREEN, YELLOW and RED cells in a range.
I manually select the correct number of # characters in the summary status
cell and color them GREEN, YELLOW and RED as required. This produces a
visual color bar on the summary line.... manually. (I actually have 112
tasks across 11 function areas and this manual approach is slow, tedious and
error prone.)

How can I automate this with VB code?

Thank you for any suggestions.

Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to color characters REG, GREEN, YELLOW in the same cell?

Adjust start, length & colourindex number to suit you needs


ActiveCell.Characters(Start:=1, Length:=5).Font.ColorIndex = 50
ActiveCell.Characters(Start:=6, Length:=2).Font.ColorIndex = 6
ActiveCell.Characters(Start:=8, Length:=3).Font.ColorIndex =

--
Message posted from http://www.ExcelForum.com

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
Confitional Formatting using (Red/Yellow/Green) for due dates Stefi Excel Discussion (Misc queries) 3 October 1st 09 08:38 PM
Conditional Formatting - Looking for Red/Yellow/Green Icons, w/ wo mikevanv Excel Worksheet Functions 0 July 21st 09 05:44 PM
I need to add a blinking red, yellow and green light to an excel Becke Wolf Excel Discussion (Misc queries) 1 April 30th 07 11:32 PM
Can I sort columns by colors, example - red, green, yellow Beth Excel Discussion (Misc queries) 3 May 19th 06 05:34 AM
Add fill colors: green & red & yellow on toolbar, instead clickin. moekan Excel Worksheet Functions 1 March 18th 05 04:57 PM


All times are GMT +1. The time now is 10:37 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"