Format Cells for binary or hexadecimal numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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,
 
Yes, but that requires using a second cell, doesn't it, which makes the
spreadsheet bigger and messier, something I was hoping to avoid.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top