Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default How to change the first letter in Capital letter

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to change the first letter in Capital letter

Hi Eric

See David's site
http://www.mvps.org/dmcritchie/excel/proper.htm

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Eric" wrote in message ...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to change the first letter in Capital letter

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


---
Message posted from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change first letter of every word to Capital klmiura Excel Discussion (Misc queries) 7 January 29th 09 05:15 PM
Find Capital Letter Boogie Excel Worksheet Functions 12 January 23rd 09 05:25 PM
New Validation option to format 1st letter as Capital letter Jeff Excel Discussion (Misc queries) 5 July 13th 06 05:11 AM
Default Capital letter for 1st letter of a word Jeff Excel Discussion (Misc queries) 6 July 10th 06 08:36 AM
Turn to capital letter SBárbara Excel Discussion (Misc queries) 2 June 22nd 06 05:18 PM


All times are GMT +1. The time now is 10:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"