home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!icd.ab.com!iccgcc.decnet.ab.com!fatican
- From: fatican@iccgcc.decnet.ab.com (Nick Fatica)
- Newsgroups: comp.apps.spreadsheets
- Subject: decoding macro
- Message-ID: <1992Nov18.142202.9299@iccgcc.decnet.ab.com>
- Date: 18 Nov 92 14:22:02 EST
- Lines: 19
-
- I'm looking for a spreadsheet macro (I'm using Quattro Pro - Special Edition)
- that will read a four digit hex number (entered as a label) from a cell, parse
- it, and enter numbers in the appropriate columns in that row according to the
- state of each bit in the hex number. For example:
-
- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA BB
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
-
- 0362 2 4 6 8 9 11 14 15 17 20 22 24 25 28
-
- One way to look at this "encoding" is to start from the right and let each odd
- number represent a "1" and each even number represent a "0" and then divide the
- even/odd pairs into groups of four (21/22, 23/24, 25/26, 27,28). So for the
- above example, 22,24,25,28 would correspond to 0010, which can be represented
- as a hex 2.
- --
- Nick Fatica fatican@astro.pc.ab.com
- The Allen-Bradley Company
- "Practice random kindness and senseless acts of beauty."
-