Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Decimal to Hexadecimal
So, my company tracks items based on DEC and HEX, some with one, some with
the other. I'm tryign to create a formula that will convert items that have, say DEC to HEX and vice versa. Problem is, when I attempt DECTOHEC and HEXTODEC, it doesn't match what I get using my company's lookup tool (an arduous process) Here's what the company conversion are for a sample set of numbers: DEC HEX 02313552326 17cecac6 02313552451 17cecb43 02313552469 17cecb55 02313552512 17cecb80 02313552538 17cecb9a 02313552779 17cecc8b 02313552798 17cecc9e 02313552829 17ceccbd 02313552891 17ceccfb 02313552900 17cecd04 05112837432 33C3E238 And Dec2Hex() gives me: DEC HEX 02313552326 89E601C6 02313552451 89E60243 02313552469 89E60255 02313552512 89E60280 02313552538 89E6029A 02313552779 89E6038B 02313552798 89E6039E 02313552829 89E603BD 02313552891 89E603FB 02313552900 89E60404 05112837432 130BFB538 I'm missing something... :-/ |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Decimal to Hexadecimal
Sean,
Your Co conversions look dodgy to me and the results Excel comes up with can be verified here http://www.statman.info/conversions/hexadecimal.html. Confused "Sean Timmons" wrote: So, my company tracks items based on DEC and HEX, some with one, some with the other. I'm tryign to create a formula that will convert items that have, say DEC to HEX and vice versa. Problem is, when I attempt DECTOHEC and HEXTODEC, it doesn't match what I get using my company's lookup tool (an arduous process) Here's what the company conversion are for a sample set of numbers: DEC HEX 02313552326 17cecac6 02313552451 17cecb43 02313552469 17cecb55 02313552512 17cecb80 02313552538 17cecb9a 02313552779 17cecc8b 02313552798 17cecc9e 02313552829 17ceccbd 02313552891 17ceccfb 02313552900 17cecd04 05112837432 33C3E238 And Dec2Hex() gives me: DEC HEX 02313552326 89E601C6 02313552451 89E60243 02313552469 89E60255 02313552512 89E60280 02313552538 89E6029A 02313552779 89E6038B 02313552798 89E6039E 02313552829 89E603BD 02313552891 89E603FB 02313552900 89E60404 05112837432 130BFB538 I'm missing something... :-/ |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Decimal to Hexadecimal
Hello, Mike!
You wrote on Fri, 5 Jan 2007 12:40:02 -0800: M Your Co conversions look dodgy to me and the results Excel M comes up with can be verified here http://www.statman.info/conversions/hexadecimal.html. M Confused M "Sean Timmons" wrote: ?? So, my company tracks items based on DEC and HEX, some ?? with one, some with the other. I'm tryign to create a ?? formula that will convert items that have, say DEC to HEX ?? and vice versa. Problem is, when I attempt DECTOHEC and ?? HEXTODEC, it doesn't match what I get using my company's ?? lookup tool (an arduous process) ?? ?? Here's what the company conversion are for a sample set of ?? numbers: DEC HEX 02313552326 17cecac6 02313552451 ?? 17cecb43 02313552469 17cecb55 02313552512 17cecb80 ?? 02313552538 17cecb9a 02313552779 17cecc8b 02313552798 ?? 17cecc9e 02313552829 17ceccbd 02313552891 17ceccfb ?? 02313552900 17cecd04 05112837432 33C3E238 ?? ?? And Dec2Hex() gives me: ?? DEC HEX ?? 02313552326 89E601C6 ?? ?? I'm missing something... :-/ The Excel values seem correct to me, two different calculators and the Windows calculator! James Silverton Potomac, Maryland E-mail, with obvious alterations: not.jim.silverton.at.comcast.not |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Decimal to Hexadecimal
Sean Timmons wrote:
So, my company tracks items based on DEC and HEX, some with one, some with the other. I'm tryign to create a formula that will convert items that have, say DEC to HEX and vice versa. Problem is, when I attempt DECTOHEC and HEXTODEC, it doesn't match what I get using my company's lookup tool (an arduous process) [....] I'm missing something... :-/ Yes: the fact that your company uses a special algorithm to effect the conversion, not a straigtht-forward conversion from decimal to hex, like Excel does. Here's what the company conversion are for a sample set of numbers: DEC HEX 02313552326 17cecac6 [....] 05112837432 33C3E238 I might not be able to tell you the precise algorithm. But based on the few examples given, the following Excel formulation yields the same results: =DEC2HEX(LEFT(A1,LEN(A1)-8)) & DEC2HEX(RIGHT(A1,8)) where A1 is the decimal number. In other words, the right-most 8 digits are taken as a number and converted to hex, which is appended to the remaining left-most digits taken as a number and converted to hex. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Decimal to Hexadecimal
DEC HEX
02313552326 17cecac6 Hi. Your company breaks the Dec number into 2 parts. 23 & 13552326 23 is 17 hex 13552326 is cecac6 hex -- HTH :) Dana DeLouis Windows XP & Office 2003 "Sean Timmons" wrote in message ... So, my company tracks items based on DEC and HEX, some with one, some with the other. I'm tryign to create a formula that will convert items that have, say DEC to HEX and vice versa. Problem is, when I attempt DECTOHEC and HEXTODEC, it doesn't match what I get using my company's lookup tool (an arduous process) Here's what the company conversion are for a sample set of numbers: DEC HEX 02313552326 17cecac6 02313552451 17cecb43 02313552469 17cecb55 02313552512 17cecb80 02313552538 17cecb9a 02313552779 17cecc8b 02313552798 17cecc9e 02313552829 17ceccbd 02313552891 17ceccfb 02313552900 17cecd04 05112837432 33C3E238 And Dec2Hex() gives me: DEC HEX 02313552326 89E601C6 02313552451 89E60243 02313552469 89E60255 02313552512 89E60280 02313552538 89E6029A 02313552779 89E6038B 02313552798 89E6039E 02313552829 89E603BD 02313552891 89E603FB 02313552900 89E60404 05112837432 130BFB538 I'm missing something... :-/ |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Decimal to Hexadecimal
Now, that was some good calculating! thank you su much for figuring that out!
It was driving me silly! "Dana DeLouis" wrote: DEC HEX 02313552326 17cecac6 Hi. Your company breaks the Dec number into 2 parts. 23 & 13552326 23 is 17 hex 13552326 is cecac6 hex -- HTH :) Dana DeLouis Windows XP & Office 2003 "Sean Timmons" wrote in message ... So, my company tracks items based on DEC and HEX, some with one, some with the other. I'm tryign to create a formula that will convert items that have, say DEC to HEX and vice versa. Problem is, when I attempt DECTOHEC and HEXTODEC, it doesn't match what I get using my company's lookup tool (an arduous process) Here's what the company conversion are for a sample set of numbers: DEC HEX 02313552326 17cecac6 02313552451 17cecb43 02313552469 17cecb55 02313552512 17cecb80 02313552538 17cecb9a 02313552779 17cecc8b 02313552798 17cecc9e 02313552829 17ceccbd 02313552891 17ceccfb 02313552900 17cecd04 05112837432 33C3E238 And Dec2Hex() gives me: DEC HEX 02313552326 89E601C6 02313552451 89E60243 02313552469 89E60255 02313552512 89E60280 02313552538 89E6029A 02313552779 89E6038B 02313552798 89E6039E 02313552829 89E603BD 02313552891 89E603FB 02313552900 89E60404 05112837432 130BFB538 I'm missing something... :-/ |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Decimal to Hexadecimal
PS....
I wrote: Sean Timmons wrote: Here's what the company conversion are for a sample set of numbers: DEC HEX 02313552326 17cecac6 [....] 05112837432 33C3E238 [....] =DEC2HEX(LEFT(A1,LEN(A1)-8)) & DEC2HEX(RIGHT(A1,8)) That works fine when the right-most 8 digits form the number 001048576 or higher. That always yields 6 hex digits. It is unclear what your company's algorithm would do with "numbers" less than 001048576. If they zero-fill to 6 hex digits, as I suspect, use: =DEC2HEX(LEFT(A1,LEN(A1)-8)) & DEC2HEX(RIGHT(A1,8),6) Also note that the formula assumes the entire decimal number (A1) is at least 9 digits. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I want to convert a column of hexadecimal numbers to decimal num | Excel Discussion (Misc queries) | |||
h:mm to decimal value | Excel Discussion (Misc queries) | |||
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. | Excel Discussion (Misc queries) | |||
How do I override fixed decimal place settings in EXcel 2003? | Excel Worksheet Functions | |||
CONVERT HEXADECIMAL CELL TO DECIMAL NUMBER | Excel Worksheet Functions |