ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   format a text cell in Excel (https://www.excelbanter.com/setting-up-configuration-excel/5047-format-text-cell-excel.html)

HowGirl

format a text cell in Excel
 
Is there a way to format cells in Excell to automatically capitalize the
first letter of text in a cell?

Nick Hodge

For data in A1, enter this in B1 and then copy and paste special the data
back to column A to replace it

=PROPER(A1)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"HowGirl" wrote in message
...
Is there a way to format cells in Excell to automatically capitalize the
first letter of text in a cell?




Gord Dibben

HowGirl

No way to format as such.

Would need event code behind the worksheet. The code below operates on cells
in columns A through H. Note the "8" which is column H. Adjust to suit.

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

Right-click on the sheet tab and "View Code". Copy/paste the code in that
sheet module.


Gord Dibben Excel MVP

On Sun, 2 Jan 2005 16:15:02 -0800, "HowGirl"
wrote:

Is there a way to format cells in Excell to automatically capitalize the
first letter of text in a cell?



HowGirl

Thanks so much - this will work for me.

"Nick Hodge" wrote:

For data in A1, enter this in B1 and then copy and paste special the data
back to column A to replace it

=PROPER(A1)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"HowGirl" wrote in message
...
Is there a way to format cells in Excell to automatically capitalize the
first letter of text in a cell?





BOB

Thank you so very much! Couldn't figure out how to use this function with
the Microsoft help (kept getting circular reference) your response indicated
how to prevent that!

"Nick Hodge" wrote:

For data in A1, enter this in B1 and then copy and paste special the data
back to column A to replace it

=PROPER(A1)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"HowGirl" wrote in message
...
Is there a way to format cells in Excell to automatically capitalize the
first letter of text in a cell?






All times are GMT +1. The time now is 08:42 AM.

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