Non alphanumerical character code in Excel

For example, I want to enter a line break into a cell value using VBA. For that I would like to know the ASCII Character code for line break - how can I get the code from Excel?

To do it in Excel, here is the answer:

a) Click on a blank cell and then press "Alt + Enter" to enter a line break as shown below.

excel non alphanumerical character code

b) To get the code for line break enter =CODE(A3) in a cell since line break has been introduced in cell A3. ASCII Value of line break is returned by the formula which can then be used in VBA.

excel non alphanumerical character code

 

You can find similar Excel Questions and Answer hereunder

1) How do I have proper (Capitalize the first letter in each word of a text) text in cells ?

2) How can I set non-contiguous print area using VBA?

3) I have a table where inputs have to come from various users. In Excel, how can I highlight a row automatically that does not have input so that I can follow up with the concerned?

4) Vba code to password protect workbook in Excel

5) How can I remove all nonprintable characters from text?

6) How can I get the last non-zero value in a row?

7) How can I have text autocomplete by typing in a short code for the text?

8) Find and count instances of a character in a string in Excel

9) How can I prevent users from seeing / accessing my macro code?

10) To easily identify sheets belonging to different Business Divisions, I would like to color code tab names - is it possible?

 

Here the previous and next chapter