David McRitchie said:
You're welcome, the variation that you mention is
that something that would be better for the rest of us.
For my actual application, I had a list of codes (15,738 of them) for
which I needed the corresponding characters. My initial sheet had a
related code in column A, the character code in hexadecimal in column B,
and a description in column C. A short sample:
A B C
212321 3000 CJK space per ANSI Z39.64
212328 FF08 Ideographic left parenthesis
212329 FF09 Ideographic right parenthesis
21232D FF0D Ideographic hyphen minus
212A46 3013 Ideographic geta symbol
I could have converted the hex values to their decimal equivalents, but
nummeric character references work just fine in hex. I inserted two
helper columns between B and C and entered a variation on your formula in
the new C1: ="&#x" & B1 & ";"
Copying C1 down the column gave me:
A B C
212321 3000
212328 FF08 (
212329 FF09 )
21232D FF0D -
212A46 3013 〓
I then used your terrific XL2HTML macro to export column C as an HTML
file. (This takes a while with such a large file.) Having had experience
with copying and pasting from HTML files before, I knew that the simpler
the content and the nearer the layout was to the intended result, the
easier it would be. Once the HTML file had been created, it was a simple
matter of copying the entire column and pasting it back into column D
using Edit > Paste special > Unicode text.
This isn't as nice as having a function that could be used in a formula
but it gets the job done.