Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default hex2bin - HEX2BIN

I want to read the values from a cell, rather than hardcoding in hex values
in a "hexvalue" formula. If the hex value is in K78, I'd like to take the
value from K78 and convert it. [i.e. Hex2Bin(K78)] I want to process
columns at a time, not just cells at a time.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hex2bin - HEX2BIN

You can loop through all the cells -

Sub ConvertColumnK()
On Error Resume Next
For Each cell In Range(Cells(1, 11), Cells(Rows.Count, 11))
cell.Value = CDbl("&H" & cell.Value)
Next
On Error GoTo 0
End Sub

In your post in Misc you said convert to Decimal. Hex2Bin converts to
binary.

--
Regards,
Tom Ogilvy



"KarenSue33" wrote in message
...
I want to read the values from a cell, rather than hardcoding in hex

values
in a "hexvalue" formula. If the hex value is in K78, I'd like to take

the
value from K78 and convert it. [i.e. Hex2Bin(K78)] I want to process
columns at a time, not just cells at a time.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default hex2bin - HEX2BIN

;D.... that's what I get for multitasking. Sorry, I meant to say HEX2DEC.
I'll try this and see if this is what I'm trying to do. Thanx much!

"Tom Ogilvy" wrote:

You can loop through all the cells -

Sub ConvertColumnK()
On Error Resume Next
For Each cell In Range(Cells(1, 11), Cells(Rows.Count, 11))
cell.Value = CDbl("&H" & cell.Value)
Next
On Error GoTo 0
End Sub

In your post in Misc you said convert to Decimal. Hex2Bin converts to
binary.

--
Regards,
Tom Ogilvy



"KarenSue33" wrote in message
...
I want to read the values from a cell, rather than hardcoding in hex

values
in a "hexvalue" formula. If the hex value is in K78, I'd like to take

the
value from K78 and convert it. [i.e. Hex2Bin(K78)] I want to process
columns at a time, not just cells at a time.




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



All times are GMT +1. The time now is 04:03 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"