View Single Post
  #8   Report Post  
Joewood77
 
Posts: n/a
Default



"David McRitchie" wrote:

Hi Joe,

The default if there is no comma will be proper case, since
I think that would be an error wouldn't know which you would prefer.

Sub Surname_Case()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim cell As Range, i As Long
On Error Resume Next 'In case no cells in selection
For Each cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
cell.Formula = Application.Proper(cell.Formula)
i = InStr(1, cell.Formula, ",")
If i 0 Then cell.Formula = Left(UCase(cell.Formula), i - 1) _
& Mid(cell.Formula, i)
Next
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub

The above is a macro, if not familiar with macro see
http://www.mvps.org/dmcritchie/excel/getstarted.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"JoeWood77" wrote in message ...
I have a list of names in both WORD and EXCEL and would like to change the
case letters to look like this...

LAST, First

How can I do this? Is there a function I could use in EXCEL or WORD?

Joe



Thank you for all of your help!!


Joe