Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I had great help from Eric last night, now I just need one small thing. I'm trying to figure out how I can change the end result to be in all capital letters. Basically after the formula I need the ranks found in the array to be in all CAPS.
Thank you
S
Thank you
S
VBA Code:
ub find_last_plus_3()
Dim LastRow As Long, WorkName As String, Title As String, x As Variant
LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
WorkName = Replace(Application.UserName, "GS-05", "Mr")
Title = ""
For Each x In Array("MR ", "Maj ", "Cpt ", "Col ")
If InStr(WorkName, x) > 0 Then
Title = x
Exit For
End If
Next x
Range("A" & LastRow + 3).Value = "UPDATED BY: " & Title & Split(WorkName, ",")(0)
End Sub