#1   Report Post  
Posted to microsoft.public.excel.programming
Geo Geo is offline
external usenet poster
 
Posts: 66
Default HEX2BIN

I am trying to use =HEX2BIN(A2,8)

If cell A2 has data this will work

If cell A2 has a formula it will not work

Does anyone know of a workaround?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default HEX2BIN

It works fine on a cell with a formula as long as a valid result is
returned.

You might want to upshift text to help it though

=hex2bin(UPPER(D6),8)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Geo" wrote in message
...
I am trying to use =HEX2BIN(A2,8)

If cell A2 has data this will work

If cell A2 has a formula it will not work

Does anyone know of a workaround?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
Geo Geo is offline
external usenet poster
 
Posts: 66
Default HEX2BIN

Hi Bob,

Thank you for your replay. I found my error but how to correct it.
In cell A1 I have 08 02 13
This has spaces which Excel detects as text.

In cell A2 I have =LEFT(A1,SEARCH(" ",A1,1))
The result is 08, again this is detected as text

In cell A3 I have =hex2bin(UPPER(A2),8) or =hex2bin(A2,8)
Both provide the #NUM error. Untill today I overlooked the fact that A2 was
not a number.

I have tried the Convert text to number as described in Help but I never get
the Convert option.

Again thanks for your help


"Bob Phillips" wrote:

It works fine on a cell with a formula as long as a valid result is
returned.

You might want to upshift text to help it though

=hex2bin(UPPER(D6),8)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Geo" wrote in message
...
I am trying to use =HEX2BIN(A2,8)

If cell A2 has data this will work

If cell A2 has a formula it will not work

Does anyone know of a workaround?

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default HEX2BIN

On Fri, 26 Aug 2005 18:39:02 -0700, Geo wrote:

Thank you for your replay. I found my error but how to correct it.
In cell A1 I have 08 02 13
This has spaces which Excel detects as text.

In cell A2 I have =LEFT(A1,SEARCH(" ",A1,1))
The result is 08, again this is detected as text

In cell A3 I have =hex2bin(UPPER(A2),8) or =hex2bin(A2,8)
Both provide the #NUM error. Untill today I overlooked the fact that A2 was
not a number.

I have tried the Convert text to number as described in Help but I never get
the Convert option.

Again thanks for your help


Your formula will return a trailing space, and that is what is giving the #NUM
error.

Also, I do not believe there is a need for UPPER in the HEX2BIN formula, at
least not in Excel 2002

To convert the first pair of digits, try:

=hex2bin(LEFT(A1,2),8)

or, if your digits may not be paired:

=hex2bin(LEFT(A18,FIND(" ",A1)-1),8)

--ron
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
Hex2Bin in VB kuch68 Excel Programming 4 April 13th 05 01:16 AM
hex2bin - HEX2BIN KarenSue33 Excel Programming 2 February 21st 05 07:11 PM


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