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
Bookmarks