What character is generated by alt-CR?

David Berg 20 Reputation points
2024-09-21T10:06:38.2966667+00:00

When a string is entered into Excel as separate lines by inserting alt-CR, what character represents that? I want to use it as an argument to the substitute() function, or otherwise determine in VBA code the number of lines occupied by a string in a comment.

Thanks

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,919 questions
{count} votes

1 answer

Sort by: Most helpful
  1. riny 170 Reputation points
    2024-09-21T11:20:42.97+00:00

    CR as in Carriage Return or Enter?

    If so, the character code for a line-feed is 10

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.