View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
stickcc stickcc is offline
external usenet poster
 
Posts: 5
Default Macro for Proper function

Thanks. I copied your macro into the source for the sheet I was working on
but I'm not really sure what to change.
Here's an example of a sheet I am working on:
Sheet name is Financials. (This is sheet 3).
I want to check column A.
What do I put where?

Once I get this figured out (with help!) I'd like to be able to save the
macro to use on other spreadsheets.

"Rick Rothstein" wrote:

Something like this should work for you (just change the ProperRange address
and SheetName assignments in the Const statements to match your actual
conditions)...

Sub MakeProperCase()
Dim R As Range, C As Range
Const ProperRange As String = "D:D"
Const SheetName As String = "Sheet1"
With Worksheets(SheetName)
Set R = Intersect(.Columns(ProperRange), .UsedRange)
For Each C In R
C.Value = StrConv(C.Value, vbProperCase)
Next
End With
End Sub

--
Rick (MVP - Excel)


"stickcc" wrote in message
...
Can someone help me write a macro that I could run on spreadsheets that I
need to be sure are in Title Case? I can't figure out how to make the
formula
to correct the cell with the information in it.
Thanks!