Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Format Cells for binary or hexadecimal numbers

Is it possible to enter a number in decimal but format the cell to display
the number in either binary or hexacecimal format?

I am running Microsoft Office Excel 2003 (11.8117.8122) SP2

Thank you,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Format Cells for binary or hexadecimal numbers

Rather than format, use the DEC2HEX() function
--
Gary''s Student - gsnu200739


"Cheryl" wrote:

Is it possible to enter a number in decimal but format the cell to display
the number in either binary or hexacecimal format?

I am running Microsoft Office Excel 2003 (11.8117.8122) SP2

Thank you,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Format Cells for binary or hexadecimal numbers

Yes, but that requires using a second cell, doesn't it, which makes the
spreadsheet bigger and messier, something I was hoping to avoid.

"Gary''s Student" wrote:

Rather than format, use the DEC2HEX() function
--
Gary''s Student - gsnu200739


"Cheryl" wrote:

Is it possible to enter a number in decimal but format the cell to display
the number in either binary or hexacecimal format?

I am running Microsoft Office Excel 2003 (11.8117.8122) SP2

Thank you,

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Format Cells for binary or hexadecimal numbers

I don't know of a way to format a number to appear as hex. Alternatives are
to run a macro like:

Sub hexit()
'
' gsnuxx
'
With Selection
V = .Value
.Formula = "=dec2hex(" & V & ")"
.Value = .Value
End With
End Sub


after the data has been entered or to use an Event macro to call hexit
automatically upon entry of data.
--
Gary''s Student - gsnu200739


"Cheryl" wrote:

Yes, but that requires using a second cell, doesn't it, which makes the
spreadsheet bigger and messier, something I was hoping to avoid.

"Gary''s Student" wrote:

Rather than format, use the DEC2HEX() function
--
Gary''s Student - gsnu200739


"Cheryl" wrote:

Is it possible to enter a number in decimal but format the cell to display
the number in either binary or hexacecimal format?

I am running Microsoft Office Excel 2003 (11.8117.8122) SP2

Thank you,

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
Format cells for hexadecimal numbers Ricsastir Excel Discussion (Misc queries) 2 December 10th 09 11:38 AM
Hexadecimal to Binary Conversion sean_f Excel Programming 4 August 4th 06 08:59 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
How do I change hexadecimal number to binary in excel Aimran Excel Worksheet Functions 3 November 9th 05 10:24 PM


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

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

About Us

"It's about Microsoft Excel"