View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheetfunctions
Steve Yandl Steve Yandl is offline
external usenet poster
 
Posts: 284
Default Is there a formula to transpose numbers, e.g. change 36 to 63

You could create a user defined function like the following:

________________________________________

Function Switcheroo(x As Integer) As Integer
Dim strDigits As String
Dim strRev As String
Dim n As Integer

strDigits = CStr(x)
n = Len(strDigits)

Do Until n = 0
strRev = strRev & Right(strDigits, 1)
strDigits = Left(strDigits, n - 1)
n = n - 1
Loop

Switcheroo = CInt(strRev)

End Function

__________________________________________

Steve


wrote in message
ps.com...
Using Excel is it possible to 'transpose' numbers

e.g. 48 becomes 84?