Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
hex2dec
I would like to know how to convert a hex2dec string value in excel 2003
ex of string value: FFFB: 00FFB125148 I only want to convert values starting at the 7th charactor ending at the 14th.(00FFB125), |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
hex2dec
This is a function I use for that:
Function Hex2Dec(strHex As String) As Long 'converts a hexadecimal number to a long 'if the prefix &H is not there, it will be added first '----------------------------------------------------- On Error GoTo ERROROUT If Left$(strHex, 2) = "&H" Then Hex2Dec = CLng(Val(strHex)) Else Hex2Dec = CLng(Val("&H" & strHex)) End If Exit Function ERROROUT: MsgBox "CAN'T HANDLE THE STRING: " & strHex, , "Hex2Dec" End Function You could then do: MsgBox Hex2Dec(Mid$("FFFB: 00FFB125148", 7, 8)) RBS "jgreen" <u19247@uwe wrote in message news:5c9ed809cbdcb@uwe... I would like to know how to convert a hex2dec string value in excel 2003 ex of string value: FFFB: 00FFB125148 I only want to convert values starting at the 7th charactor ending at the 14th.(00FFB125), |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
hex2dec | Excel Discussion (Misc queries) | |||
How do I 'Add-In' Hex2Dec formula? | Excel Worksheet Functions | |||
Hex2Dec substitue? | Excel Discussion (Misc queries) | |||
conditional format with hex2dec | Excel Programming |