View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stuart Peters Stuart Peters is offline
external usenet poster
 
Posts: 8
Default Hexidecimal lookup

Harlan,
This is exactly what I was looking for (a list of all the faults given the
input), I had to expand on your formula as I go out to 8 character for the
fault.
Maybe I could have made it simple by just listing the Decimal values in my
look up table, and converting my first input.

Thanks again.

"Harlan Grove" wrote:

Stuart Peters wrote...
I know there is a way to do this I just can't figure it out.


Why? Spreadsheets aren't meant to work with hexadecimal numerals.
Trying to make them do so is a LOT of work.

Below is the lookup table.
I would like to enter a Hexidecimal number and have the program return all
the Fault descriptions that are applicable.
For instance If I enter the Hex value '2C'
I should get the following list:
General Fault Indicator
Temperature Indicator
Power Supply Indicator

Note: Fault value in column A in Hex

....

Hexadecimal 'numbers' are always text, so they need to have leading
zeros in order for, say, "9" as "00009" to be less than "10000".

Assuming your table with column headings is in A1:B21, with fault code
entered in cell G3 and first fault description in cell H3, *and* with
the Analysis ToolPak loaded so that you can use HEX2DEC and DEC2HEX,
try these formulas.

H3:
=LOOKUP(RIGHT("00000"&G3,5),RIGHT("00000"&$A$2:$A$ 21,5),$B$2:$B$21)

H4:
=IF(IF(H3<"",MOD(HEX2DEC($G$3),HEX2DEC(INDEX($A$2 :$A$21,MATCH(H3,
$B$2:$B$21,0))))),LOOKUP(DEC2HEX(MOD(HEX2DEC($G$3) ,
HEX2DEC(INDEX($A$2:$A$21,MATCH(H3,$B$2:$B$21,0)))) ,5),
RIGHT("00000"&$A$2:$A$21,5),$B$2:$B$21),"")

Fill H4 down into H5:H22 to cover fault code entry of FFFFF.