ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Forcing Cell Entries to be Upper Case (https://www.excelbanter.com/excel-worksheet-functions/8223-forcing-cell-entries-upper-case.html)

Colin James

Forcing Cell Entries to be Upper Case
 
Does anyone know of a way that I can force cell entries to be uppercase?

Frank Kabel

Hi
you could use a custom validation. e.g. for cell A1 goto 'Data - Validation'
and enter the formula
=EXACT(A1,UPPER(A1))

--
Regards
Frank Kabel
Frankfurt, Germany

Colin James wrote:
Does anyone know of a way that I can force cell entries to be
uppercase?




Don Guillett



--
Don Guillett
SalesAid Software

"Colin James" <Colin
wrote in message
...
Does anyone know of a way that I can force cell entries to be uppercase?




Colin James

Thanks Frank,
but that just gives an error if it's not uppercase. I really need to change
the entry to uppercase if someone enters it in lower. I think it may be
impossible without writing a macro to check after each entry and then
overwriting the entry.
Colin

"Frank Kabel" wrote:

Hi
you could use a custom validation. e.g. for cell A1 goto 'Data - Validation'
and enter the formula
=EXACT(A1,UPPER(A1))

--
Regards
Frank Kabel
Frankfurt, Germany

Colin James wrote:
Does anyone know of a way that I can force cell entries to be
uppercase?





Frank Kabel

Hi
then see:
http://www.cpearson.com/excel/case.htm
and use the worksheet_change event

--
Regards
Frank Kabel
Frankfurt, Germany

Colin James wrote:
Thanks Frank,
but that just gives an error if it's not uppercase. I really need to
change the entry to uppercase if someone enters it in lower. I think
it may be impossible without writing a macro to check after each
entry and then overwriting the entry.
Colin

"Frank Kabel" wrote:

Hi
you could use a custom validation. e.g. for cell A1 goto 'Data -
Validation' and enter the formula
=EXACT(A1,UPPER(A1))

--
Regards
Frank Kabel
Frankfurt, Germany

Colin James wrote:
Does anyone know of a way that I can force cell entries to be
uppercase?




Colin James

Fantastic. Many thanks.

"Frank Kabel" wrote:

Hi
then see:
http://www.cpearson.com/excel/case.htm
and use the worksheet_change event

--
Regards
Frank Kabel
Frankfurt, Germany

Colin James wrote:
Thanks Frank,
but that just gives an error if it's not uppercase. I really need to
change the entry to uppercase if someone enters it in lower. I think
it may be impossible without writing a macro to check after each
entry and then overwriting the entry.
Colin

"Frank Kabel" wrote:

Hi
you could use a custom validation. e.g. for cell A1 goto 'Data -
Validation' and enter the formula
=EXACT(A1,UPPER(A1))

--
Regards
Frank Kabel
Frankfurt, Germany

Colin James wrote:
Does anyone know of a way that I can force cell entries to be
uppercase?





Rachel

Changing Case On Data Entry

In Excel97 and later versions, you can use the Worksheet_Change event
procedure to automatically change the case of the text when the data is
entered. In the sheet module for the worksheet that contains the cells you
want to have updated, enter the following code:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub

This will automatically change the case of the data when the user enters
data in the range A1:A10. Change this range to the range you need to use for
your application.

The code Application.EnableEvents = False prevents the Worksheet_Change
event from calling itself as it changes the value of the target cell.

You can modify this code as described in the previous section to force the
entered values to be in either lower or proper case.


"Colin James" wrote:

Does anyone know of a way that I can force cell entries to be uppercase?


Nolene

Forcing Cell Entries to be Upper Case
 
I need to do the same thing. Where exactly do I put this code (I have Excel
2003)? I'm not sure how to find the "sheet module." And if I send the
worksheet to someone else will it stay with the worksheet? Pardon my
ignorance.

"Rachel" wrote:

Changing Case On Data Entry

In Excel97 and later versions, you can use the Worksheet_Change event
procedure to automatically change the case of the text when the data is
entered. In the sheet module for the worksheet that contains the cells you
want to have updated, enter the following code:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub

This will automatically change the case of the data when the user enters
data in the range A1:A10. Change this range to the range you need to use for
your application.

The code Application.EnableEvents = False prevents the Worksheet_Change
event from calling itself as it changes the value of the target cell.

You can modify this code as described in the previous section to force the
entered values to be in either lower or proper case.


"Colin James" wrote:

Does anyone know of a way that I can force cell entries to be uppercase?


Peo Sjoblom

Forcing Cell Entries to be Upper Case
 
Right click the sheet tab of the sheet you want top use, select view code
and paste in the code.
Make sure you enable macros when you open the workbook


--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(Remove ^^ from email)


"Nolene" wrote in message
...
I need to do the same thing. Where exactly do I put this code (I have Excel
2003)? I'm not sure how to find the "sheet module." And if I send the
worksheet to someone else will it stay with the worksheet? Pardon my
ignorance.

"Rachel" wrote:

Changing Case On Data Entry

In Excel97 and later versions, you can use the Worksheet_Change event
procedure to automatically change the case of the text when the data is
entered. In the sheet module for the worksheet that contains the cells
you
want to have updated, enter the following code:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing Then
Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub

This will automatically change the case of the data when the user enters
data in the range A1:A10. Change this range to the range you need to use
for
your application.

The code Application.EnableEvents = False prevents the Worksheet_Change
event from calling itself as it changes the value of the target cell.

You can modify this code as described in the previous section to force
the
entered values to be in either lower or proper case.


"Colin James" wrote:

Does anyone know of a way that I can force cell entries to be
uppercase?




Jim Lavigne

Forcing Cell Entries to be Upper Case
 
Thanks. You solved the problem for me, too.

Jim

"Frank Kabel" wrote:

Hi
then see:
http://www.cpearson.com/excel/case.htm
and use the worksheet_change event

--
Regards
Frank Kabel
Frankfurt, Germany

Colin James wrote:
Thanks Frank,
but that just gives an error if it's not uppercase. I really need to
change the entry to uppercase if someone enters it in lower. I think
it may be impossible without writing a macro to check after each
entry and then overwriting the entry.
Colin

"Frank Kabel" wrote:

Hi
you could use a custom validation. e.g. for cell A1 goto 'Data -
Validation' and enter the formula
=EXACT(A1,UPPER(A1))

--
Regards
Frank Kabel
Frankfurt, Germany

Colin James wrote:
Does anyone know of a way that I can force cell entries to be
uppercase?






All times are GMT +1. The time now is 10:20 AM.

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