Signed data
Hello, I know that signed data is always numerical, but is it possible to create an input schedule where user enters some characters...lets say ABC and the worksheet logic converts it into some kind of numerical value? may be ascii or lets just say take value based on what character is it in the alphabet....A=1, B=2...so abc would be 123 something like that? basically my goal is to have user input some characters as signed data...but due to the system limitation of signed data in numerical only, I want to use vb script or worksheet logic to convert to some numerical value. thanks.
Former Member replied
Hi Zack,
we saved the BPC User-ID (5 Digits Text) as a number in the BPC cubes to track changes on several accounts.
We used the following 2 vb functions (quick and dirty, could be optimized):
Public Function sGetUserNum(sUser As String) As String Dim i As Integer Dim sReturn, sNewString As String sUser = UCase(sUser) sReturn = "1" For i = 1 To Len(sUser) sNewString = Asc(Mid(sUser, i, 1)) If Len(sNewString) = 1 Then sNewString = "0" & sNewString sReturn = sReturn & sNewString Next sGetUserNum = sReturn End Function Public Function sGetUserName(sNum As String) As String Dim i, ipos As Integer Dim sReturn, sNewString As String sNum = Right(sNum, Len(sNum) - 1) ipos = 1 For i = 1 To Len(sNum) / 2 sNewString = Chr(Mid(sNum, ipos, 2)) sReturn = sReturn & sNewString ipos = ipos + 2 Next sGetUserName = sReturn End Function
Perhaps you can do some adjustments to fullfill your needs.
But attention, this generates big numbers, so i dont know if its working in your case.
Regards
Jörg