Forums Neueste Beiträge
 

Change Case

27/03/2009 - 21:45 von RENEE | Report spam
all Have an Excel 2007 spreadsheet and I want to change it from upper case to
sentence case. I know you can do this in word through a "change case" spot,
but cannot find that in Excel.
 

Lesen sie die antworten

#1 Andreas Killer
28/03/2009 - 11:01 | Warnen spam
RENEE schrieb:

all Have an Excel 2007 spreadsheet and I want to change it from upper case to
sentence case. I know you can do this in word through a "change case" spot,
but cannot find that in Excel.


It's not clear what you want to change, the sheet himself or each cell
in that sheet.

If you want to change the cells take a look at the excel text-functions.

The sheet himself can be renamed with this very simple VBA-Code:

Function SentenceCase(ByVal S As String) As String
'Return S in sentence case style
SentenceCase = WorksheetFunction.Proper(S)
End Function

Sub Test()
Dim S As Worksheet

'Rename your sheet
Set S = Sheets("YOUR SHEET NAME")
S.Name = SentenceCase(S.Name)

'Rename all sheets
For Each S In Sheets
S.Name = SentenceCase(S.Name)
Next
End Sub

Andreas.

Ähnliche fragen