LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default One single character to upper case

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
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
Need character for custom format to force upper case! Andrew C[_2_] Excel Discussion (Misc queries) 2 April 1st 09 06:03 AM
Changing file in all upper case to upper and lower case Sagit Excel Discussion (Misc queries) 15 May 30th 07 06:08 AM
Case sensitive and single character in cell praveen_khm[_22_] Excel Programming 0 February 7th 06 02:21 PM
Determine whether a character is Upper or Lower case [email protected] Excel Programming 2 December 2nd 05 09:44 PM
Changing single column default to Upper case Graham Excel Discussion (Misc queries) 4 September 27th 05 05:17 PM


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

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

About Us

"It's about Microsoft Excel"