ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do i make every first letter caps? (https://www.excelbanter.com/excel-discussion-misc-queries/55793-how-do-i-make-every-first-letter-caps.html)

Nicole

How do i make every first letter caps?
 
Im typing business names and want to know if there is a way to automaticly
make every first letter in caps

David McRitchie

How do i make every first letter caps?
 
Hi Nicole,
See http://www.mvps.org/dmcritchie/excel/proper.htm
You would install both proper_case and proper_case_inner macros.
The reason for one macro invoking the other is to reduce the need for duplicate code.

You can customize how some names are to be capitalized such as
McRitchie, de Bruin, von Allen

I would not advise doing this automatically with an Event macro, because you will
always have exceptions, and watching things change after you hit enter can be a wee
bit frustrating. As far as while you type without entering that is not possible in Excel.
--
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

"Nicole" wrote in message ...
Im typing business names and want to know if there is a way to automaticly
make every first letter in caps




Gord Dibben

How do i make every first letter caps?
 
Nicole

Automatically would require VBA code.

Do you want that?

Example................

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 8 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = Application.Proper(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

This is worksheet event code.

Right-click on the sheet tab and "View Code"

Copy the above code into that module.

As written it operates on the first 8 columns of the sheet.


Gord Dibben Excel MVP

On Wed, 16 Nov 2005 13:39:58 -0800, Nicole
wrote:

Im typing business names and want to know if there is a way to automaticly
make every first letter in caps



Michael

How do i make every first letter caps?
 
Hi Nicole. Assuming you type your business names in Column A, say starting
with independent construction in A2, you could type in B2: =Proper(A2) and
it will convert A2 to Independent Construction. Copy B2 down as far as
needed and then Copy, Paste Special, Values. You could then delete column A.
HTH
--
Sincerely, Michael Colvin


"Nicole" wrote:

Im typing business names and want to know if there is a way to automaticly
make every first letter in caps


Gord Dibben

How do i make every first letter caps?
 
Good point David.


Gord

On Wed, 16 Nov 2005 17:25:33 -0500, "David McRitchie"
wrote:

I would not advise doing this automatically with an Event macro, because you will
always have exceptions, and watching things change after you hit enter can be a wee
bit frustrating. As far as while you type without entering that is not possible in Excel.




All times are GMT +1. The time now is 09:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com