change caps to sentence case

K

kay

How do I change cap letters to sentence case in columns within my excel spreadsheet?
 
G

Gord Dibben

Kay

One column at a time......

Enter =PROPER(A1) and drag/copy down.

Copy/paste special>values(in place) on the column then delete the original.

VBA Macro from David McRitchie.........

If unsure of what to do with this code, see David's Getting Started with
Macros and VBA.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Sub Proper()
'David McRitchie, programming, 2003-03-07
Dim rng1 As Range, rng2 As Range, bigrange As Range
Dim cell As Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
On Error Resume Next
Set rng1 = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeConstants))
Set rng2 = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeFormulas))
On Error GoTo 0
If rng1 Is Nothing Then
Set bigrange = rng2
ElseIf rng2 Is Nothing Then
Set bigrange = rng1
Else
Set bigrange = Union(rng1, rng2)
End If
If bigrange Is Nothing Then
MsgBox "All cells in range are EMPTY"
GoTo done
End If
For Each cell In bigrange
cell.Formula = Application.Proper(cell.Formula)
Next cell
done:
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub

Gord Dibben Excel MVP
 
D

Dave Peterson

If there's only one sentence in the cell:

=UPPER(LEFT(A1,1))&LOWER(MID(A1,2,LEN(A1)))

But it soon becomes a pain looking for stuff that could end the sentence.
 
D

David McRitchie

Hi Kay,
First letter of each sentence capitalized and handles multiple sentences.

Sentence_Case, Re: Use VBS RegExp to replace a-z with A-Z?,
Tushar Mehta, programming, 2002-08-04.
http://google.com/[email protected]

You can find the above link in the Related area of my proper.htm page,
if you want to find it again.
 
D

Dave Peterson

I remembered that Tushar wrote a procedure, but couldn't find it.

Thanks,

David said:
Hi Kay,
First letter of each sentence capitalized and handles multiple sentences.

Sentence_Case, Re: Use VBS RegExp to replace a-z with A-Z?,
Tushar Mehta, programming, 2002-08-04.
http://google.com/[email protected]

You can find the above link in the Related area of my proper.htm page,
if you want to find it again.
---
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

Dave Peterson said:
If there's only one sentence in the cell:

=UPPER(LEFT(A1,1))&LOWER(MID(A1,2,LEN(A1)))

But it soon becomes a pain looking for stuff that could end the sentence.
 
D

Debra Dalgleish

Did you help him look for it? <g>

Dave said:
I remembered that Tushar wrote a procedure, but couldn't find it.

Thanks,

David said:
Hi Kay,
First letter of each sentence capitalized and handles multiple sentences.

Sentence_Case, Re: Use VBS RegExp to replace a-z with A-Z?,
Tushar Mehta, programming, 2002-08-04.
http://google.com/[email protected]

You can find the above link in the Related area of my proper.htm page,
if you want to find it again.
---
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

Dave Peterson said:
If there's only one sentence in the cell:

=UPPER(LEFT(A1,1))&LOWER(MID(A1,2,LEN(A1)))

But it soon becomes a pain looking for stuff that could end the sentence.



kay wrote:

How do I change cap letters to sentence case in columns within my excel spreadsheet?
 
D

Dave Peterson

"Remember that there is a fine line between cool and irritating."

hehehe.

Debra said:
Did you help him look for it? <g>

Dave said:
I remembered that Tushar wrote a procedure, but couldn't find it.

Thanks,

David said:
Hi Kay,
First letter of each sentence capitalized and handles multiple sentences.

Sentence_Case, Re: Use VBS RegExp to replace a-z with A-Z?,
Tushar Mehta, programming, 2002-08-04.
http://google.com/[email protected]

You can find the above link in the Related area of my proper.htm page,
if you want to find it again.
---
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


If there's only one sentence in the cell:

=UPPER(LEFT(A1,1))&LOWER(MID(A1,2,LEN(A1)))

But it soon becomes a pain looking for stuff that could end the sentence.



kay wrote:

How do I change cap letters to sentence case in columns within my excel spreadsheet?
 
D

Debra Dalgleish

Ouch! Anyway, I crossed that line years ago.

Dana DeLouis posted a Sentence Case macro too:

http://groups.google.com/groups?&threadm=uozj4JzUBHA.2076@tkmsftngp03

Dave said:
"Remember that there is a fine line between cool and irritating."

hehehe.

Debra said:
Did you help him look for it? <g>

Dave said:
I remembered that Tushar wrote a procedure, but couldn't find it.

Thanks,

David McRitchie wrote:


Hi Kay,
First letter of each sentence capitalized and handles multiple sentences.

Sentence_Case, Re: Use VBS RegExp to replace a-z with A-Z?,
Tushar Mehta, programming, 2002-08-04.
http://google.com/[email protected]

You can find the above link in the Related area of my proper.htm page,
if you want to find it again.
---
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



If there's only one sentence in the cell:

=UPPER(LEFT(A1,1))&LOWER(MID(A1,2,LEN(A1)))

But it soon becomes a pain looking for stuff that could end the sentence.



kay wrote:


How do I change cap letters to sentence case in columns within my excel spreadsheet?
 
Top