How to change the first letter in Capital letter

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hi There,

Can anybody help me how to change the first letter of my
item description into a capital letter, in a macro, I have
more that 5000 item description that I have to be changed
the first letter into a Caps so that when I sort them it
will go together. It is time consuming to change it one
by one. Like company to Company, name to Name, etc.

Thanks for your help.

Eric
 
you can loop the data so it will fit your layout but I would use
something like

Dim strTemp As String

Dim i As Integer
i = 0
Do Until Trim(Range("A1").Offset(i, 0).Value) = ""
strTemp = Trim(Range("A1").Offset(i, 0).Value)
strTemp = Left(UCase(strTemp), 1) & Right(strTemp, Len(strTemp)
- 1)
Range("A1").Offset(i, 0).Value = strTemp
i = i + 1
Loop

Keith
www.kjtfs.com
 

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