Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to do a simple macro to change the third character in a
selected cell to upper case, if the first two characters are "Mc". It's for an address list where the names go Mcintosh, Mcardle, etc and really need to be McIntosh, McArdle, with the third character uppercase. I tried the macro below but it doesn't work. Am I using UCase in the wrong way, or the MID function? Sub McName_Adjustment() Dim cell As Range For Each cell In Selection.Cells a = cell.Value If Left(a, 2) = "Mc" Then UCase (Mid(a, 3, 1)) End If Next End Sub Thanks for any advice anyone can give. Steve Wylie |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need character for custom format to force upper case! | Excel Discussion (Misc queries) | |||
Changing file in all upper case to upper and lower case | Excel Discussion (Misc queries) | |||
Case sensitive and single character in cell | Excel Programming | |||
Determine whether a character is Upper or Lower case | Excel Programming | |||
Changing single column default to Upper case | Excel Discussion (Misc queries) |