Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old August 21st 07, 02:13 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2007
Posts: 3
Default Leading Zero in Hexadecimal?

I'm using the DEC2HEX function to convert decimal numbers in cells to hex numbers.

For Hex 00 to 09, how do I format the cells so that there is a leading zero?




  #2   Report Post  
Old August 21st 07, 02:34 AM posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 2,062
Default Leading Zero in Hexadecimal?

This appears to work okay:

=TEXT(DEC2HEX(A1),"00")

"Tony" wrote:

I'm using the DEC2HEX function to convert decimal numbers in cells to hex numbers.

For Hex 00 to 09, how do I format the cells so that there is a leading zero?




  #3   Report Post  
Old August 21st 07, 02:48 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2007
Posts: 3
Default Leading Zero in Hexadecimal?

Works from 0-9, but OOPS, I forgot to add that I need it for 0A-0F, too...



"JMB" wrote in message
...
This appears to work okay:

=TEXT(DEC2HEX(A1),"00")

"Tony" wrote:

I'm using the DEC2HEX function to convert decimal numbers in cells to hex numbers.

For Hex 00 to 09, how do I format the cells so that there is a leading zero?






  #4   Report Post  
Old August 21st 07, 03:13 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 35,218
Default Leading Zero in Hexadecimal?

00-0F?

"0"&dec2hex(a1)
since 0-15 will return a single character.



Tony wrote:

Works from 0-9, but OOPS, I forgot to add that I need it for 0A-0F, too...

"JMB" wrote in message
...
This appears to work okay:

=TEXT(DEC2HEX(A1),"00")

"Tony" wrote:

I'm using the DEC2HEX function to convert decimal numbers in cells to hex numbers.

For Hex 00 to 09, how do I format the cells so that there is a leading zero?





--

Dave Peterson
  #5   Report Post  
Old August 21st 07, 03:20 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2007
Posts: 3
Default Leading Zero in Hexadecimal?

That did it - thanks!


"Dave Peterson" wrote in message
...
00-0F?

"0"&dec2hex(a1)
since 0-15 will return a single character.



Tony wrote:

Works from 0-9, but OOPS, I forgot to add that I need it for 0A-0F, too...

"JMB" wrote in message
...
This appears to work okay:

=TEXT(DEC2HEX(A1),"00")

"Tony" wrote:

I'm using the DEC2HEX function to convert decimal numbers in cells to hex

numbers.

For Hex 00 to 09, how do I format the cells so that there is a leading zero?





--

Dave Peterson





  #6   Report Post  
Old August 21st 07, 03:32 AM posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 2,062
Default Leading Zero in Hexadecimal?

Perhaps:
=IF(ISODD(LEN(DEC2HEX(A1))),"0","")&DEC2HEX(A1)

"Tony" wrote:

Works from 0-9, but OOPS, I forgot to add that I need it for 0A-0F, too...



"JMB" wrote in message
...
This appears to work okay:

=TEXT(DEC2HEX(A1),"00")

"Tony" wrote:

I'm using the DEC2HEX function to convert decimal numbers in cells to hex numbers.

For Hex 00 to 09, how do I format the cells so that there is a leading zero?









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
Decimal to Hexadecimal Sean Timmons Excel Discussion (Misc queries) 6 January 5th 07 10:45 PM
How do you sort a column with Hexadecimal data lion99 Excel Discussion (Misc queries) 2 November 10th 06 07:14 PM
Formula for converting Binary to Hexadecimal Teraawete Tekena New Users to Excel 1 March 23rd 06 07:14 AM
Hexadecimal to binary [email protected] Excel Discussion (Misc queries) 5 March 4th 06 05:45 PM
adding hexadecimal numbers Dave New Users to Excel 3 February 10th 06 08:46 AM


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

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017