Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Embedded Dec2hex help needed

need help:
I am copying a bunch of 12 digit unique IDs over from Notepad into excel and
I then need to convert a portion (the first 11 digits) of the number into
HEX.
Some of the unique IDs have one or two zeros in the beg of the values:
008453518958
011144250839
So I am using the DEC2HEX(Left(A2,11)) but I am not getting the right
results. It seems to be ignoring the zeros so for the first unique ID it is
converting 8453518958...basically I want to ignore the last digit but am
having issues with the zeros
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Embedded Dec2hex help needed

"mogulboy" wrote...
....
I then need to convert a portion (the first 11 digits) of the number into
HEX. Some of the unique IDs have one or two zeros in the beg of the values:
008453518958
011144250839
So I am using the DEC2HEX(Left(A2,11)) but I am not getting the right
results. It seems to be ignoring the zeros so for the first unique ID it
is converting 8453518958...basically I want to ignore the last digit but
am having issues with the zeros


If these values are numbers formatted as "000000000000" (12 0s in sequence),
then the cell only APPEARS with the leading 0s, but they're not part of the
cell's contents or its value. You can ensure these numbers are converted
correctly by including a TEXT call.

=DEC2HEX(LEFT(TEXT(A2,"000000000000"),11))


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Embedded Dec2hex help needed

If you want to ignore the last digit, use
=DEC2HEX(LEFT(A2,LEN(A2)-1))

Remember that when Excel stores numbers as numbers, it doesn't store leading
zeroes (even if the cell is formatted to display them).
--
David Biddulph

"mogulboy" wrote in message
...
need help:
I am copying a bunch of 12 digit unique IDs over from Notepad into excel
and
I then need to convert a portion (the first 11 digits) of the number into
HEX.
Some of the unique IDs have one or two zeros in the beg of the values:
008453518958
011144250839
So I am using the DEC2HEX(Left(A2,11)) but I am not getting the right
results. It seems to be ignoring the zeros so for the first unique ID it
is
converting 8453518958...basically I want to ignore the last digit but am
having issues with the zeros



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
embedded ifs Daniel Q. Excel Worksheet Functions 3 July 25th 06 05:26 PM
Embedded Font tomkorver Excel Discussion (Misc queries) 2 May 20th 06 01:58 PM
Embedded Text Box EK Excel Discussion (Misc queries) 3 January 5th 06 07:00 AM
Embedded Objects Lightfoot Excel Discussion (Misc queries) 0 December 30th 05 02:20 PM
Help needed referencing an embedded file teepee Excel Discussion (Misc queries) 0 April 24th 05 12:03 PM


All times are GMT +1. The time now is 08:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"