Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hiya, I've modified a bit of code, below, so that if someone types anything into cell C25, then it capitalises the first letter. Is there any way of modifying it a little bit more so that, as well as the above, if someone types in a 3-letter word then it capitalises all three letters? So, if I enter 'daniel', it returns 'Daniel'. If I enter 'dan' it returns 'DAN'. Private Sub Worksheet_Change(ByVal Target As Excel.Range) On Error GoTo ErrHandler If Target.Count = 1 And Target.Column = 3 Then Application.EnableEvents = False sStr = Target.Value Target.Value = UCase(Left(sStr, 1)) & LCase( _ Mid(sStr, 2)) End If ErrHandler: Application.EnableEvents = True End Sub Many thanks, Dan. -- Voodoodan ------------------------------------------------------------------------ Voodoodan's Profile: http://www.excelforum.com/member.php...nfo&userid=597 View this thread: http://www.excelforum.com/showthread...hreadid=505301 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Merge address in XL to Word letter template | Excel Discussion (Misc queries) | |||
Pulling a Letter from a cell and filling another cell with info | Excel Worksheet Functions | |||
Convert Text (letter) To Number Excel | Excel Worksheet Functions | |||
numerical value of a letter | Excel Worksheet Functions | |||
Have A Letter Reference A Name For An Intoduction | New Users to Excel |