ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do i use format cells to alpha / numeric values (https://www.excelbanter.com/excel-worksheet-functions/262909-how-do-i-use-format-cells-alpha-numeric-values.html)

Samvid69

how do i use format cells to alpha / numeric values
 
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.


L. Howard Kittle

how do i use format cells to alpha / numeric values
 
Try =UPPER(E2)

HTH
Regards,
Howard

"Samvid69" wrote in message
...
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.




ozgrid.com

how do i use format cells to alpha / numeric values
 
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



--
Regards
Dave Hawley
www.ozgrid.com
"Samvid69" wrote in message
...
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.




All times are GMT +1. The time now is 06:31 PM.

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