Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Craig
 
Posts: n/a
Default Capitilize first letter

How do you get Excel to capitalize automatically the first letter when typing
a name in each cell. Example, when I type a name, I have to manually
capitalize the first letter in the name.

Thank you very much


  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

Bob Phillips provided you a solution yesterday:

http://tinyurl.com/6gged

HTH
Jason
Atlanta, GA

-----Original Message-----
How do you get Excel to capitalize automatically the

first letter when typing
a name in each cell. Example, when I type a name, I have

to manually
capitalize the first letter in the name.

Thank you very much


.

  #3   Report Post  
Don Guillett
 
Posts: n/a
Default

try right click sheet tabview codecopy paste thisSAVE. as written works
only in col A (1)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 1 Then Exit Sub
Application.EnableEvents = False

If Target.HasFormula Then
Target.Formula = Application.Proper(Target.Formula)
Else
Target.Value = StrConv(Target.Value, vbProperCase)
End If
Application.EnableEvents = True
End Sub

--
Don Guillett
SalesAid Software

"Craig" wrote in message
...
How do you get Excel to capitalize automatically the first letter when

typing
a name in each cell. Example, when I type a name, I have to manually
capitalize the first letter in the name.

Thank you very much




  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

You'd need to do it using VBA. To automatically capitalize text in
column A, one way:


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If .Column = 1 Then
Application.EnableEvents = False
.Value = UCase(Left(.Text, 1)) & Mid(.Text, 2)
Application.EnableEvents = True
End If
End With
End Sub

Put this in the worksheet code module (right-click the worksheet tab and
choose View Code).

In article ,
"Craig" wrote:

How do you get Excel to capitalize automatically the first letter when typing
a name in each cell. Example, when I type a name, I have to manually
capitalize the first letter in the name.

Thank you very much

  #5   Report Post  
Craig
 
Posts: n/a
Default

Hi Don

I pasted code after typing a couple same strings in cells A1 and A2. but
went to run the macro and it wasnt listed as a macro name... I couldnt run
your macro below...please advise...thanks...



"Don Guillett" wrote:

try right click sheet tabview codecopy paste thisSAVE. as written works
only in col A (1)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 1 Then Exit Sub
Application.EnableEvents = False

If Target.HasFormula Then
Target.Formula = Application.Proper(Target.Formula)
Else
Target.Value = StrConv(Target.Value, vbProperCase)
End If
Application.EnableEvents = True
End Sub

--
Don Guillett
SalesAid Software

"Craig" wrote in message
...
How do you get Excel to capitalize automatically the first letter when

typing
a name in each cell. Example, when I type a name, I have to manually
capitalize the first letter in the name.

Thank you very much







  #6   Report Post  
Craig
 
Posts: n/a
Default

Don,

followup..I got it to work...thanks...but why dont I have to run it as a
standard macro? how does it know to run after I press Enter in the worksheet
cell.

thanks...great code

craig

"Don Guillett" wrote:

try right click sheet tabview codecopy paste thisSAVE. as written works
only in col A (1)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 1 Then Exit Sub
Application.EnableEvents = False

If Target.HasFormula Then
Target.Formula = Application.Proper(Target.Formula)
Else
Target.Value = StrConv(Target.Value, vbProperCase)
End If
Application.EnableEvents = True
End Sub

--
Don Guillett
SalesAid Software

"Craig" wrote in message
...
How do you get Excel to capitalize automatically the first letter when

typing
a name in each cell. Example, when I type a name, I have to manually
capitalize the first letter in the name.

Thank you very much





  #7   Report Post  
Dave Peterson
 
Posts: n/a
Default

This worksheet_change is an event that excel is always looking for. (You can
disable it if you want or you can use it to help.)

Excel has lots of these events and is always looking for something to do.

Chip Pearson has a nice instruction page at his site that explains lots more
about events.

http://www.cpearson.com/excel/events.htm



Craig wrote:

Don,

followup..I got it to work...thanks...but why dont I have to run it as a
standard macro? how does it know to run after I press Enter in the worksheet
cell.

thanks...great code

craig

"Don Guillett" wrote:

try right click sheet tabview codecopy paste thisSAVE. as written works
only in col A (1)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 1 Then Exit Sub
Application.EnableEvents = False

If Target.HasFormula Then
Target.Formula = Application.Proper(Target.Formula)
Else
Target.Value = StrConv(Target.Value, vbProperCase)
End If
Application.EnableEvents = True
End Sub

--
Don Guillett
SalesAid Software

"Craig" wrote in message
...
How do you get Excel to capitalize automatically the first letter when

typing
a name in each cell. Example, when I type a name, I have to manually
capitalize the first letter in the name.

Thank you very much






--

Dave Peterson
  #9   Report Post  
MadHungarian
 
Posts: n/a
Default

You can try this. I use this for my music listing worksheets. I created a
simple macro (CTRL P) in my PERSONAL.XLS Worksheet as follows:

Click on MACRO's
Macros again
Macro Name Dialog Box Comes Up
Name your macro
Click on edit
Enter the following and exit

' Macro recorded 1/30/2005 by Richard Meszaros
' Keyboard Shortcut: Ctrl+p
ExisText$ = Chr$(34) + ActiveCell.Text + Chr$(34)
ActiveCell.Formula = "=Proper" + ("(" + ExisText$ + ")")
End Sub

Now just click on the cell you want to "Properize" and hit CTRL-P.

This will be available to all of your worksheets.



"Craig" wrote:

How do you get Excel to capitalize automatically the first letter when typing
a name in each cell. Example, when I type a name, I have to manually
capitalize the first letter in the name.

Thank you very much


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capitalize first letter when type a name in each cell. Craig Brody Excel Worksheet Functions 6 December 20th 04 03:21 PM
Is there a way I can enter a letter to proceed text a column of ce Gordon Excel Discussion (Misc queries) 3 December 13th 04 07:13 PM
Letter format Ratowl Excel Discussion (Misc queries) 3 December 5th 04 12:23 AM
letter Validation Maltenrazer Excel Worksheet Functions 2 November 6th 04 05:00 PM
Function / formula to be used if cell contains a letter. Cameron Stewart Excel Worksheet Functions 2 November 2nd 04 12:12 AM


All times are GMT +1. The time now is 02:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"