ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Auto Uppercase (https://www.excelbanter.com/excel-discussion-misc-queries/144597-auto-uppercase.html)

Randy

Auto Uppercase
 
Hello, I have a question pertaining to forcing particular cells into
uppercase text. I have about six cells, all in different rows & columns, that
will have an "x" typed into the cell. I need this "x" to auto-convert to an
uppercase "X". Is there an easy way to do this?

Also, was wondering if there is a way to make these cells automatically
place an uppercase "X" in the cell no matter what letter, number or
charachter the users type? Example, if a user types an "a" or a "c" into the
cell it will automatically convert to an Uppercase "X"...

Any assistance will be greatly appreciated.

I thank you in advance for your time!

--
Randy Street
Rancho Cucamonga, CA

DazzaData

Auto Uppercase
 
Not really! I woyuld use data validation to force them to put X in the cell,
or post process then input in a hidden column to the left.

Formatting can make anything show as X but it will not have the value X

"Randy" wrote:

Hello, I have a question pertaining to forcing particular cells into
uppercase text. I have about six cells, all in different rows & columns, that
will have an "x" typed into the cell. I need this "x" to auto-convert to an
uppercase "X". Is there an easy way to do this?

Also, was wondering if there is a way to make these cells automatically
place an uppercase "X" in the cell no matter what letter, number or
charachter the users type? Example, if a user types an "a" or a "c" into the
cell it will automatically convert to an Uppercase "X"...

Any assistance will be greatly appreciated.

I thank you in advance for your time!

--
Randy Street
Rancho Cucamonga, CA


JE McGimpsey

Auto Uppercase
 
One way:

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

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const sINPUTS As String = "A1,B2,C3,D4,E5,F6"
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range(sINPUTS), .Cells) Is Nothing Then
If Not IsEmpty(.Value) Then
On Error Resume Next
Application.EnableEvents = False
.Value = "X"
Application.EnableEvents = True
On Error GoTo 0
End If
End If
End With
End Sub


In article ,
Randy wrote:

Hello, I have a question pertaining to forcing particular cells into
uppercase text. I have about six cells, all in different rows & columns, that
will have an "x" typed into the cell. I need this "x" to auto-convert to an
uppercase "X". Is there an easy way to do this?

Also, was wondering if there is a way to make these cells automatically
place an uppercase "X" in the cell no matter what letter, number or
charachter the users type? Example, if a user types an "a" or a "c" into the
cell it will automatically convert to an Uppercase "X"...

Any assistance will be greatly appreciated.

I thank you in advance for your time!


Randy

Auto Uppercase
 
Hi JE and thank you for your response. This however did not seem to do
anything. Am I missing something? I pasted as directed but no effect. What
exactly or which part was this to control? Do I need to change any settings
under options?
--
Randy Street
Rancho Cucamonga, CA


"JE McGimpsey" wrote:

One way:

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

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const sINPUTS As String = "A1,B2,C3,D4,E5,F6"
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range(sINPUTS), .Cells) Is Nothing Then
If Not IsEmpty(.Value) Then
On Error Resume Next
Application.EnableEvents = False
.Value = "X"
Application.EnableEvents = True
On Error GoTo 0
End If
End If
End With
End Sub


In article ,
Randy wrote:

Hello, I have a question pertaining to forcing particular cells into
uppercase text. I have about six cells, all in different rows & columns, that
will have an "x" typed into the cell. I need this "x" to auto-convert to an
uppercase "X". Is there an easy way to do this?

Also, was wondering if there is a way to make these cells automatically
place an uppercase "X" in the cell no matter what letter, number or
charachter the users type? Example, if a user types an "a" or a "c" into the
cell it will automatically convert to an Uppercase "X"...

Any assistance will be greatly appreciated.

I thank you in advance for your time!



JE McGimpsey

Auto Uppercase
 
Well, you should change the sINPUTS to the addresses of your specific
cells, but that's about it.

See

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


In article ,
Randy wrote:

Hi JE and thank you for your response. This however did not seem to do
anything. Am I missing something? I pasted as directed but no effect. What
exactly or which part was this to control? Do I need to change any settings
under options?


Randy

Auto Uppercase
 
Ok...well for some reason it's working now! Thank you very much! You are the
master!
--
Randy Street
Rancho Cucamonga, CA


"JE McGimpsey" wrote:

Well, you should change the sINPUTS to the addresses of your specific
cells, but that's about it.

See

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


In article ,
Randy wrote:

Hi JE and thank you for your response. This however did not seem to do
anything. Am I missing something? I pasted as directed but no effect. What
exactly or which part was this to control? Do I need to change any settings
under options?




All times are GMT +1. The time now is 12:55 PM.

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