LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default multiple text colors in a cell

the code below enters a name in a blank cell with a space at the end. if there's
a name with a space, it put's a - after it and adds another name. the else adds
a cr and another name and a space, so i get 2 names per line. with a dash
between 2 names.

the authleave just adds an * if needed. the pre contains either lcase(fname) or
ucase(fname), based on another variable, so i get upper and lower case names to
make the distinction.

if i wanted to use text colors, how could i assign a text color instead of upper
or lower case, when the variable is encountered ? if it's too difficult, just
let me know and don't worry about it, this will suffice for my needs.


With Workbooks(Curbook).Worksheets(Cursheet).Cells(Day( OfSetVal) + 3, m + 1)
If .Value = "" Then
.Value = Left(pre, Len(fname) - 4) & authLeave & " "
ElseIf Right(.Value, 1) = " " Then
.Value = Left(.Value, Len(.Value) - 1) & "-" & Left(pre, Len(fname) - _
4) & authLeave
Else
.Value = .Value & Chr(10) & Left(pre, Len(fname) - 4) & authLeave & " "
End If
End With


Gary



 
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
Worksheet formatting (fill colors & text colors) disappeared sweettooth Excel Discussion (Misc queries) 2 June 24th 08 01:16 AM
Cell colors or text color changing when date in cell gets closer. Chase Excel Worksheet Functions 5 October 19th 06 08:57 AM
Multiple Colors (at the same time) in a cell with a formula MACRE0 Excel Discussion (Misc queries) 3 August 16th 06 02:40 AM
multiple colors for one cell heatherz70 Excel Discussion (Misc queries) 2 January 30th 06 08:20 AM
I TELL A CELL =B1 BUT I ALSO WANT IT TO TAKE THE TEXT COLORS Don't Excel Worksheet Functions 3 September 25th 05 06:50 PM


All times are GMT +1. The time now is 04:37 AM.

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

About Us

"It's about Microsoft Excel"