Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I have a bunch of Hex values in a spreadsheet that I want to convert to Dec.

 

Is there a way in SQL I can do this, as Excel is very limited in that I have to do Hex2Dec("VALUE") and replace Value manually. I can't do it as a cell reference, so it's taking too long.

 

I was hoping there's a way I could have the column in Excel and then add another Column in for it to do its conversion.

 

Any thoughts?

Posted

If you get the values in one column and then you can run the concatenate function in another.

 

The function would look something like this

 

=CONCATENATE("Hex2Dec(",A1,")") - This is assuming the value is in A1

Posted
Err why not just reference the other cell, then drag it down? :o Unless I'm missing something?

 

Steve

Because you can't reference the cell. The 'Value' has to be a number not a cell. And FN-GM, that doesn't work either.

Posted
Because you can't reference the cell. The 'Value' has to be a number not a cell. And FN-GM, that doesn't work either.

 

I just tried in Excel and it worked fine. Cell A1 = 8a. Cell B1 =Hex2Dec(A1) = 138.

 

Are your hex values formated as text instead of no formatting?

Posted (edited)
I just tried in Excel and it worked fine. Cell A1 = 8a. Cell B1 =Hex2Dec(A1) = 138.

 

Are your hex values formated as text instead of no formatting?

 

Also checked at it works here.

 

Try building the function rule using the GUI?

Edited by FN-GM

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...