Hi,
I have data in excel sheet but some of the data in hexadecimal format.I need a macro to change the hexadecimal values to ascii values.
thx...
Hi,
I have data in excel sheet but some of the data in hexadecimal format.I need a macro to change the hexadecimal values to ascii values.
thx...
Try:
![]()
Sub foo() Dim c As Range On Error Resume Next For Each c In Selection c.Value = WorksheetFunction.Hex2Dec(c.Text) Next c End Sub
let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source
If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE
Walking the tightrope between genius and eejit...
Hi,
just notice worksheet function Hex2Dec is limited to 10 characters.
If there is more characters to convert, up to 15, better is to use full VBA convertion :
![]()
Function Hexa2Dec$(Rg As Range) Dim Cel As Range For Each Cel In Rg Select Case Len(Cel.Value) Case Is > 15: Exit Function Case Is > 0: V = V + CDec("&h" & Cel.Value) End Select Next Hexa2Dec = Format$(V, "#,##0") End Function
If more than a cell in the range, this function operates a sum of the hexa cells …
Last edited by Marc L; 04-11-2014 at 12:32 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks