OK.
Step 1. In cell B1 I put the formula:
=MID(SUBSTITUTE(A1," ",""),SMALL(IF(MID(SUBSTITUTE(A1," ",""),ROW(1:24),1)<>"0",ROW(1:24)),1),24)
This is an array formula, so must be entered with Ctrl-Shift-Enter, not just enter.
Step 1a.
In C1 I put the formula:
=SUM(HEX2DEC(MID(B1,ROW(INDIRECT("1:" & LEN(B1))),1))*16^(LEN(B1)-ROW(INDIRECT("1:" & LEN(B1)))))
This is also an array formula, so again must be entered with Ctrl-Shift-Enter, it converts the Hex number in B1 into a decimal value.
Step 2.
There's a standard DEC2BIN function in Excel (and, indeed, a HEX2DEC function), but they can't cope with numbers this size, so I wrote a user-defined function:
Normally this sort of function would use Mod, but I've been told there's a bug in the Mod function when handling large numbers, so I've avoided it.
Anyway, with this code in a VBA module I can now put in G1:
=dec2longbin(C1)
And it will convert the decimal number to a binary one, and it seems to match the examples that you've given.
Does that get you started?
Bookmarks