Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Seagondollar
 
Posts: n/a
Default How can I convert an 8 character Hex word to binary for a lookup?

I have a machine that spits out a string of 8 Hex characters that I need to
provide a lookup table to identify conditions. Since the positive limit of
Hex2bin is 1FF, I need to isolate one or 2 nibbles for translation.

E.G.: How can I pick out something like the FF in a string of 01a4FF92?


  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Not a lot to go on ....

If "FF" is case sensitive:

=ISNUMBER(FIND("FF","01a4FF92"))

If not case sensitive:

=ISNUMBER(SEARCH("FF","01a4FF92"))

Of course, you mentioned using a lookup, maybe if you provide some more
detail a better solution could be offered.

Biff

"Seagondollar" wrote in message
...
I have a machine that spits out a string of 8 Hex characters that I need to
provide a lookup table to identify conditions. Since the positive limit
of
Hex2bin is 1FF, I need to isolate one or 2 nibbles for translation.

E.G.: How can I pick out something like the FF in a string of 01a4FF92?




  #3   Report Post  
Seagondollar
 
Posts: n/a
Default

I've thought about this some more. In a string of eight Hex characters,
example:

0000xx00 (where xx = 00 to FF)

I need to do a lookup on those two (and only those two) characters to
identify conditions.

I know I could write this in C or something, but I'm trying to provide a
general Excel tool for our non-SW oriented brethren to be able to load
registers of multiple 8 character Hex strings to see the machine's state.




"Biff" wrote:

Hi!

Not a lot to go on ....

If "FF" is case sensitive:

=ISNUMBER(FIND("FF","01a4FF92"))

If not case sensitive:

=ISNUMBER(SEARCH("FF","01a4FF92"))

Of course, you mentioned using a lookup, maybe if you provide some more
detail a better solution could be offered.

Biff

"Seagondollar" wrote in message
...
I have a machine that spits out a string of 8 Hex characters that I need to
provide a lookup table to identify conditions. Since the positive limit
of
Hex2bin is 1FF, I need to isolate one or 2 nibbles for translation.

E.G.: How can I pick out something like the FF in a string of 01a4FF92?






  #4   Report Post  
Seagondollar
 
Posts: n/a
Default

I've thought about this some more. In a string of eight Hex characters,
example:

0000xx00 (where xx = 00 to FF)

I need to do a lookup on those two (and only those two) characters to
identify conditions.

I know I could write this in C or something, but I'm trying to provide a
general Excel tool for our non-SW oriented brethren to be able to load
registers of multiple 8 character Hex strings to see the machine's state.




"Biff" wrote:

Hi!

Not a lot to go on ....

If "FF" is case sensitive:

=ISNUMBER(FIND("FF","01a4FF92"))

If not case sensitive:

=ISNUMBER(SEARCH("FF","01a4FF92"))

Of course, you mentioned using a lookup, maybe if you provide some more
detail a better solution could be offered.

Biff

"Seagondollar" wrote in message
...
I have a machine that spits out a string of 8 Hex characters that I need to
provide a lookup table to identify conditions. Since the positive limit
of
Hex2bin is 1FF, I need to isolate one or 2 nibbles for translation.

E.G.: How can I pick out something like the FF in a string of 01a4FF92?






  #5   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Ok, so what do you need to lookup?

In Excel a hex string is evaluated as a text string because it contains both
alpha and numeric chars. You can of course convert that string to a numeric
value by using one of the Hex2 functions.

So, if you have hex strings of 8 chars and only need to do a lookup based on
the 5th and 6th char positions:

A1 = 01a4FF92

Then a lookup formula could be something like this:

=VLOOKUP(MID(A1,5,2),H1:I5,2,0)

Performs a lookup of "FF" in the table located in the range H1:I5 and
returns the corresponding value from column 2 of that table.

Biff

"Seagondollar" wrote in message
...
I've thought about this some more. In a string of eight Hex characters,
example:

0000xx00 (where xx = 00 to FF)

I need to do a lookup on those two (and only those two) characters to
identify conditions.

I know I could write this in C or something, but I'm trying to provide a
general Excel tool for our non-SW oriented brethren to be able to load
registers of multiple 8 character Hex strings to see the machine's state.




"Biff" wrote:

Hi!

Not a lot to go on ....

If "FF" is case sensitive:

=ISNUMBER(FIND("FF","01a4FF92"))

If not case sensitive:

=ISNUMBER(SEARCH("FF","01a4FF92"))

Of course, you mentioned using a lookup, maybe if you provide some more
detail a better solution could be offered.

Biff

"Seagondollar" wrote in message
...
I have a machine that spits out a string of 8 Hex characters that I need
to
provide a lookup table to identify conditions. Since the positive
limit
of
Hex2bin is 1FF, I need to isolate one or 2 nibbles for translation.

E.G.: How can I pick out something like the FF in a string of
01a4FF92?










  #6   Report Post  
Seagondollar
 
Posts: n/a
Default

I'll give that a try. Sounds like it's what I need.

Now if we can get Microsoft to remove the previous replies rather than us
having to keep this from getting exponentially long (Or would that be
geometrically? I don't know. Still waiting for the caffiene to kick in.)

Thanx



"Biff" wrote:

Hi!

Ok, so what do you need to lookup?

In Excel a hex string is evaluated as a text string because it contains both
alpha and numeric chars. You can of course convert that string to a numeric
value by using one of the Hex2 functions.

So, if you have hex strings of 8 chars and only need to do a lookup based on
the 5th and 6th char positions:

A1 = 01a4FF92

Then a lookup formula could be something like this:

=VLOOKUP(MID(A1,5,2),H1:I5,2,0)

Performs a lookup of "FF" in the table located in the range H1:I5 and
returns the corresponding value from column 2 of that table.


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
convert value in word. For Exampe Rs.115.00 convert into word as . Shakti Excel Discussion (Misc queries) 1 May 10th 05 12:00 PM
in mail merge how do i convert currency from excel to word amedeo Excel Discussion (Misc queries) 1 May 5th 05 10:34 PM
convert character to value at relative cell Turk Excel Worksheet Functions 2 April 5th 05 10:58 PM
How to convert Word table with paragraphing to Excel? phoenix Excel Discussion (Misc queries) 6 February 19th 05 12:01 AM
How to convert the table in word to excel sheet? Santhosh Excel Discussion (Misc queries) 1 December 2nd 04 10:15 AM


All times are GMT +1. The time now is 10:45 AM.

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"