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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top