Force entry as uppercase

  • Thread starter Thread starter sjh54321
  • Start date Start date
S

sjh54321

Can anyone help? I have put validation on cells in a column to only
allow specific values (E and Q). I now want to force the entry to this
column to be uppercase rather than having to remember to use the
<SHIFT> key. Default entry, which is lowercase, fails the validation.

Is this possible? If so, can anyone point me in the right direction.

Thanks

Si
 
If you put E,Q directly in the Source box of the data|validation dialog
(Settings tab), then the entry has to match exactly.

(Using a list on a worksheet doesn't work this way.)
 
EXCEL SHOULDN'T EVER BE USED FOR DATA ENTRY

IT IS CALLED DATA ENTRY, NOT GARBAGE ENTRY

Excel isn't a capable tool for data entry and everyone that uses a
spreadsheet when they shuold be using an Access report.. you should
fire those types of people

Excel is a PITA.. im just tired of seeing you monkeys make the same
spreadsheet week in and week out
 
I have put the values I want in the source field - in this case th
string E,Q.
What i want do is force entry into this field to be upper case so i
passes the validation. At present the default is lowercase where eve
E and Q fail the validation. I want to avoid the user having to use th
<SHIFT> key
 
Either put your list into a couple of cells (so case won't matter) or type in
all the options (E,e,F,f) in the list.

Then you could use a worksheet event to make it uppercase:

rightclick on the worksheet tab that owns that cell. Then select view code.
Paste this in. (Change A1 to the cell's address that you want.) Then back to
excel and try it out.

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("a1")) Is Nothing Then Exit Sub

On Error GoTo errHandler:

Application.EnableEvents = False
Target.Value = UCase(Target.Value)

errHandler:
Application.EnableEvents = True

End Sub
 
Back
Top