Visual Basic

  • Thread starter Thread starter Pinda
  • Start date Start date
P

Pinda

I have this piece of code.

Private Sub Worksheet_Change(ByVal Target As Range)
'On Error Resume Next
If Not Intersect(Range("A5:A83"), Target) Is Nothing
Then
With Target
If Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
End If

It changes everything to uppercase within the cell
reference.

Is it possible to edit the code so that it changes the
first 2 letters in each cell to upper case but leaves the
third letter in lower case? Please advise I would be very
grateful.

Regards.
 
Back
Top