Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Good day, the following code works perfect, but I tried to insert
before the end and it does seem to work. I would like the font to be white and not wrapped.
Thank you,
Excel Formula:
Font.Color = vbWhite
Thank you,
VBA Code:
Sub Title_Name()
Dim Lastrow As Long
Dim wName As String, wSurame As String, Title As String
Dim x As Variant
Lastrow = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Row
wName = Replace(Application.UserName, "ESQ", "MR")
wSurname = UCase(Split(wName, ",")(0))
For Each x In Array("THEY", "", "MR", "MA'AM", "MS", "MRS", "MSgt")
If InStr(wName, x) > 0 Then
Title = UCase(x)
Exit For
End If
Next x
Range("A" & Lastrow + 8).Value = "UPDATED BY: " & Title & wSurname
End Sub