
Esta pregunta se basa en el módulo de aquí:¿Cómo puedo convertir un número hexadecimal a un número decimal en Excel?
El módulo que estoy usando (del enlace de arriba) es el siguiente:
Option Explicit
Public Function HexadecimalToDecimal(HexValue As String) As Double
' If hex starts with 0x, replace it with &H to represent Hex that VBA will understand
Dim ModifiedHexValue As String
ModifiedHexValue = Replace(HexValue, "0x", "&H")
HexadecimalToDecimal = CDec(ModifiedHexValue)
End Function
Lo tengo haciendo:
HexadecimalToDecimal(00007FF7BE6B0000)
Lo que da el resultado correcto de
"140702028333056"
Me gustaría recibir ayuda para revertir el módulo anterior y pasar de decimal a hexadecimal.
Decimal a hexadecimal(140702028333056)
Debería resultar en:
"00007FF7BE6B0000"(o obviamente "7FF7BE6B0000")
¡Cualquier ayuda u orientación seguramente será apreciada!