Home > Back-end >  Decimal turn 33 hexadecimal code
Decimal turn 33 hexadecimal code

Time:10-12

Everybody is good!
Urgent for decimal turn 33 hexadecimal code,
Is what I want to use macros in EXCLE build a custom function "tenTO33
"33 hexadecimal rule is: 0,1,2,3,4,5,6,7,8,9, A, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Y, Z, 10 letters: I, O, U don't have to, the rest of the normal water, below is the code, but there will be A phenomenon weight code (for example: 33 in 66 and 2178 to calculate in the decimal base results are 20), please have A look at what is going wrong, thank you very much!!!!!!

The Function tenTo33 (x) As Long As the String
Dim As Integer I
Dim TMP As Long
TMP=x
Dim xStr (0 To 32) As String
For I=0 To 9
XStr (I)=I
Next I
For I=10 To 17
XStr (I)=CRH (I + 55)
Next I
For I=18 To 22
XStr (I)=CRH (I + 56)
Next I
For I=23 To 27
XStr (I)=CRH (I + 57)
Next I
For I=28 To 32
XStr (I)=CRH (I + 58)
Next I
For I=10 To 1 Step - 1
If the Int (TMP/33 ^ I) & gt; 0 Then
TenTo33=tenTo33 & amp; XStr (Int (TMP/^ I) 33)
TMP=TMP - Int (TMP/33 ^ I) * 33 ^ I
End the If
Next I
TenTo33=tenTo33 & amp; XStr (TMP)
End the Function

CodePudding user response:

.
For I=0 To 9
XStr (I)=I
.
To:
For I=0 To 9
XStr (I)=char (I + 48)

CodePudding user response:

33 in 66 and 2178 to calculate in the decimal base results are 20?

After decimal 20 and 120, two are 20 ah

CodePudding user response:

1/f, thanks to reply, but I tried the code I provided the calculation results, please help to confirm it, thank you very much!!!!!!!!!!

CodePudding user response:

 Function tenTo33 (x) As Long As the String 
Dim As Integer I
Dim TMP As Long
Dim start As Boolean
TMP=x
Dim xStr (0 To 32) As String
For I=0 To 32
Select a Case I
Case 0 To 9: xStr (I)=CRH (I + 48)
Case 10 To 17: xStr (I)=CRH (I + 55)
Case of 18 To 22: xStr (I)=CRH (I + 56)
A Case of 23 To 27: xStr (I)=CRH (I + 57)
28 To 32 Case: xStr (I)=CRH (I + 58)
End the Select
Next I
For I=10 To 1 Step - 1
If the Int (TMP/33 ^ I) & gt; 0 Then
Start=True
End the If
If the start Then
TenTo33=tenTo33 & amp; XStr (Int (TMP/^ I) 33)
If the Int (TMP/33 ^ I) & gt; 0 Then
TMP=TMP - Int (TMP/33 ^ I) * 33 ^ I
End the If
End the If
Next I
TenTo33=tenTo33 & amp; XStr (TMP)
End the Function

CodePudding user response:

Problem solving and special thanks to the 4th floor

CodePudding user response:

 
Const arr: string='0123456789 acdefghjklmnpqrstvwxyz';

The function num33 (n: integer) : char;
The begin
Num33:=arr [n].
end;

CodePudding user response:

Upstairs lives should not be asked to the VB area?

CodePudding user response:

The
reference 7 floor HSFZXJY response:
upstairs lives should not be asked to the VB area?
wrong: the building should not be asked to the VB area?
  • Related