By: Lutfor Rahman Shimanto

In reply to Rahul Dixit.

Hello Rahul Dixit

Thanks for visiting our blog and sharing such an exciting problem! I have reviewed your problem and come up with an Excel VBA User-defined function. Please check the following:

Excel VBA Code:

Function ConvertNumbersToLetters(inputStr As String) As String

Dim numArray() As String
Dim resultArray() As String
Dim i As Integer
Dim currentNum As String
Dim convertedNum As String

numArray = Split(inputStr, ",")
ReDim resultArray(LBound(numArray) To UBound(numArray))

For i = LBound(numArray) To UBound(numArray)
currentNum = Trim(numArray(i))
convertedNum = ""
Dim j As Integer
Dim currentChar As String

For j = 1 To Len(currentNum)
currentChar = Mid(currentNum, j, 1)
Select Case currentChar
Case "1"
convertedNum = convertedNum & "A"
Case "2"
convertedNum = convertedNum & "B"
Case "3"
convertedNum = convertedNum & "C"
Case "4"
convertedNum = convertedNum & "D"
Case "5"
convertedNum = convertedNum & "E"
Case "6"
convertedNum = convertedNum & "F"
Case "7"
convertedNum = convertedNum & "G"
Case "8"
convertedNum = convertedNum & "H"
Case "9"
convertedNum = convertedNum & "I"
Case "0"
convertedNum = convertedNum & "O"
Case Else
convertedNum = convertedNum & currentChar
End Select
Next j

resultArray(i) = convertedNum
Next i

ConvertNumbersToLetters = Join(resultArray, ", ")

End Function

Hopefully, you have found the solution you were looking for. I have attached the solution workbook as well; good luck.

DOWNLOAD SOLUTION WORKBOOK

Regards
Lutfor Rahman Shimanto
Excel & VBA Developer
ExcelDemy