Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
convert numbers to alpha code
I need to convert numbers to an alpha equivilant. ie if colum a is 123 I
would like colum b to convert that to abc. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
convert numbers to alpha code
Seems useless enough to be homework, especially with all of the
misspellings. Here is an example that will convert what is in a cell that is double-clicked to a value and place it into the cell to the right, regardless of previous content. Install by right clicking on the worksheet tab, choose "View Code" and insert the following. Option Explicit Private Sub Worksheet_BeforeDoubleClick(ByVal Target _ As Range, Cancel As Boolean) Cancel = True Dim i As Double, str As String, txt As String txt = Target.Value Dim v As Integer str = "" For i = 1 To Len(txt) If IsNumeric(Mid(txt, i, 1)) Then v = Mid(txt, i, 1) + 1 str = str & Mid("jabcdefghi", v, 1) Else str = str & Mid(txt, i, 1) End If Next i Target.Offset(0, 1) = str End Sub You can read more about macros on my pages. -- --- HTH, David McRitchie, Microsoft MVP - Excel My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "chas" wrote in message ... I need to convert numbers to an alpha equivilant. ie if colum a is 123 I would like colum b to convert that to abc. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert a julian gregorian date code into a regular date | Excel Worksheet Functions | |||
Why are 1/2 my numbers imported as text and the rest as numbers? | Excel Discussion (Misc queries) | |||
Change case...help please | Excel Worksheet Functions | |||
Convert text to numbers | Excel Worksheet Functions | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions |