Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi

Does anyone have a calculation up their sleeve that will convert a numeric value into hexadecimal? I've tried myself with a combination of built-in functions, but I'm not very good at math so it never comes out right.

Thanks

Middle("0123456789ABCDEF",1+ Mod(Int(DecNum/16/16/16),16), 1) &

Middle("0123456789ABCDEF",1+ Mod(Int(DecNum/16/16),16), 1) &

Middle("0123456789ABCDEF",1+ Mod(Int(DecNum/16),16), 1) &

Middle("0123456789ABCDEF", 1+Mod(DecNum,16), 1)

... where DecNum is the decimal number you want to convert. This will handle up to 65535 decimal or FFFF hex. If you need more digits, just append more terms on the beginning of the calculation. Add an additional /16 for each one.

[This message has been edited by BobWeaver (edited February 02, 2001).]

  • Author

Bob

Thanks a lot. I'd got all the right functions, but couldn't get my punctuation right!

  • Author

...BTW

How do I do it in reverse (hex to dec)?

(((Position("0123456789ABCDEF", Upper(Middle(HexNum, 1, 1)), 1, 1)-1)*16+

Position("0123456789ABCDEF", Upper(Middle(HexNum, 2, 1)), 1, 1)-1)*16+

Position("0123456789ABCDEF", Upper(Middle(HexNum, 3, 1)), 1, 1)-1)*16+

Position("0123456789ABCDEF", Upper(Middle(HexNum, 4, 1)), 1, 1)-1

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.