Creating a Hex to Dec formula
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey guys,
Attached is a file that I use for a formula in excel to convert hexs to decs (Cell C3) and vice versa (Cell C6). Is there a formula that can do what this function is doing in excel? I don't think Alteryx has a Hex2Dec formula or a concatenate formula.
Any help would be appreciated. Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@vtika16 I think the formulas would look something like this. Alteryx just uses a + instead of Concatenate. Alteryx has hextonumber and inttohex functions that you can use. I'm attaching a simple workflow that implements both calculations.
Hex to Dec:
Right("00000000"+tostring(HexToNumber(Left([Hex],8))),10) +Right("000000000000"+tostring(HexToNumber(Right([Hex],6))),8)
Dec to Hex:
Right("000000"+inttohex(tonumber(Left([Dec],10))),8)+Right("000000"+inttohex(tonumber(Right([Dec],8))),6)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Patrick,
Thank you. I just found the hex2number function. I didn't know it would be that easy for a transition from the excel formula to Alteryx. Much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@vtika16 Glad I could help! I've never dealt with Hex and Dec conversions before, so this was a welcome challenge. So thank you! You did all the hard work with your formulas in excel, and I did the easy part of converting it to Alteryx lingo.
