> > ... > > Say we have the value 0x79C0, I want to have excel strip > off the lower > > 6 bits and convert to decimal. > > And so I get the final result of 487. Is there a simple > way in excel > > to do this? > > > Don't have Excel installed anywhere currently, so from > memory, and subject to typos, you should be able to use ... > = HEX2DEC( MID(A1,3,LEN(A1)-2) ) / 64 > where A1 is the cell containing the text "0x79C0". > > The Mid() function will find the length of the hex text > string and return everything but the first 2 chars (the > "0x"). 64 is the 6 bits on the right (2^6). You could also do a lookup table with one column of "text" 0,1,2,3...A,B,C,D,E,F and the next column of numbers, 0,1,2,3...10,11,12,13,14,15 and then make your own version of Hex2Dec. If I remember the command is actually LOOKUP(src,dest,value) where src is the text column, dest is the number column and value is the thing to look up. In this case, it would be Niels MID... formula --- James. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist