自己用的toHex

Sub tohex()

 Dim I As Integer, h1 As String, h2 As String

 Sheet1.Range("a1").Replace " ", ""

 

 For I = 1 To Len([a1]) Step 1

  If I Mod 2 > 0 Then

     h1 = h1 + Mid([a1], I, 1)

  Else

     h2 = h2 + Mid([a1], I, 1)

  End If

  

 Next I

 

 [a2] = h1

 [a3] = h2

 

End Sub

 

你可能感兴趣的:(自己用的toHex)