inverse of the column function? i.e. input a number, output the corresponding column text label
Well, the fix I gave you is correct for the part of your formula it applies
to. What Lars-Åke pointed out was a problem with the IF part of our code.
Here is the corrected formula I posted in my sub thread...
=IF(A126,CHAR(64+INT((A1-1)/26)),"")&CHAR(65+MOD(A1-1,26))
I'm pretty sure this is correct (for XL2003 and earlier as Lars-Åke also
pointed out).
--
Rick (MVP - Excel)
"Rick Rothstein" wrote in message
...
Actually, as Lars-Åke points out in my sub thread, this fix does not
really work.
--
Rick (MVP - Excel)
"Rick Rothstein" wrote in message
...
Otherwise, this same approach gets more complicated (for columns above
Z)
=IF(A126,CHAR(INT(A1/26)+64),"")&CHAR(MOD(A1,26)+64)
This one fails for a value of 26 (it returns "@" instead of "Z"). I ran
into the same problem while developing my 2nd posted solution.
I should have mentioned here, the fix is simple... change the part after
the ampersand to this...
CHAR(MOD(A1-1,26)+65)
Rick
|