View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JulieD JulieD is offline
external usenet poster
 
Posts: 618
Default Damsel Needs Assitance with Proper_Case Macro

Hi

not a knight in shining armour but this should help -

there is a function to do this in VBA

Sub StopHittingHead()
Dim rng As Range
Dim cell As Range

Set rng = Range("A1:A159") 'change to suit
For Each cell In rng
cell.Value = StrConv(cell.Value, vbProperCase)
Next
End Sub

Cheers
JulieD

"SP" wrote in message
...
Hi all, Looking for some assistance here from a knight in shining amour.

I
found this macro on Microsoft's KB:

Sub Proper_Case()
' Loop to cycle through each cell in the specified range.
For Each x In Range("C1:C5")
' There is not a Proper function in Visual Basic for Applications.
' So, you must use the worksheet function in the following form:
x.Value = Application.Proper(x.Value)
Next
End Sub


I need to modify it to do the whole spreadsheet. I am VBA Phobia and have
been working with it for over 30 minutes. PLEASE HELP!!!

I just need to macro to change all cells that have uppercase to reflect
capitalizing the first letter of each word in the cell.

Thanks So Much

@-------

Sheri