The formulas below will take any text input and return the ASCII value of each character that comprises that string.
Contents:
Formulas
For every ASCII number listed in a single cell (as in the picture above), you can use the following formula:
=TEXTJOIN(" ",,CODE(MID(string, SEQUENCE(LEN(string)), 1)))
For a vertically spilled dynamic array use the following formula:
=CODE(MID(string, SEQUENCE(LEN(string)), 1))
And for a horizontally spilled dynamic array use the following:
=CODE(MID(string, SEQUENCE(1, LEN(string)), 1))
Explanation
These functions can all be broken up into five main parts from the five functions used: LEN, SEQUENCE, MID, CODE, and TEXTJOIN.
We'll use the formula that combines all of the characters into a single cell, and the string "Sample".
The first part of the formula is the LEN function that returns the number of characters in a given cell. In this case, the number 6.
This length number is then fed to the SEQUENCE function, which generates a dynamic array. The size of which matches the number of characters in the cell.
The next step is using the MID function. This function, combined with the array from the SEQUENCE function, will separate a cell into individual characters.
From there, all that is left to do is to use the CODE function to convert the separated characters into ASCII and concatenate them into a single cell using the TEXTJOIN function.
In this formula the delimiter used is a space, " ", but a comma (or any other symbol) could also be used.