=PROPER

S

stumpy

Is it possible to apply the =PROPER command to the entire worksheet. I have a .CSV file I would like to fix prior to importing back into my other program.
 
R

Ron de Bruin

Hi stumpy

See David his page about this
http://www.mvps.org/dmcritchie/excel/proper.htm

Or use this one for the selection
(ctrl-a to select the whole sheet)

Sub Propercase_macro()
Dim selectie As Range
Dim cel As Range
On Error Resume Next
Set selectie = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
If selectie Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each cel In selectie
cel.Value = StrConv(cel.Value, vbProperCase)
Next cel
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)




stumpy said:
Is it possible to apply the =PROPER command to the entire worksheet. I have a .CSV file I would like to fix prior to
importing back into my other program.
 
D

Dave R.

One way is to create another worksheet, and put =proper(sheet1!a1) in A1,
then copy it to as far as there are rows and columns on the other worksheet.
then copy and paste special your proper case text, and save that as CSV.


stumpy said:
Is it possible to apply the =PROPER command to the entire worksheet. I
have a .CSV file I would like to fix prior to importing back into my other
program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top