how do i use format cells to alpha / numeric values

S

Samvid69

HAVE A STRING OF DATA i WANT TO ENTER into a cell, but I also want to set
format to set the values. eg. if I put in asd123 I want it to appear as
ASD123 but there are also occasions when I will put in a different mix of
letters/numbers a12s3d, which I also want to come out as A12S3D. I can do
this in Access but cant seem to crack the code in excel.

Please help.
 
O

ozgrid.com

Right on the sheet name tab and choice View Code and paste in the code below
after modifying the range to suit.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub

On Error Resume Next
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End If
On Error GoTo 0

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top