Write an Excel User Defined Function.
Pseudocode for the function is below:
string returnValue;
for each ( char c in string)
returnValue = returnValue + Chr(char)
return returnValue
You can call the UDF as part of an excell formula eg
=StringToASCIICodeValues(A1)
Formula Version
You could do it manually with excel builtin formula's by (excel doesn't have a for-loop function for formulae)
- A1="some string"
- A2="=MID($A$1,COLUMN(A2),1)"
- Drag the formula in cell A2 to the right. Drag to K2 for
some string
example.
- A3="=CODE(A2)"
- Drag the formula in cell A3 to the right. Drag to K3 for
some string
example.
- A4="=A3"
- B4="=CONCATENATE(A4,B3)"
- Drag the formula in cell B4 to the right. Drag to Cell K4 for
some string
example.
- The right most column with a value on row 4 contains the final value. For
some string
it will return: 11511110910132115116114105110103
in cell K4