You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Numbers couldn't find paragraph break

I am trying to copy the first words (or first line) from the cells of a column. The first words are separated by a paragraph break. I used the formula =LEFT(C2,SEARCH(CHAR(182),C2)). But I got an error saying “SEARCH couldn’t find the value ¶”. 


I checked the pilcrow right after the first word by selecting the words in the cell, it was clearly there.


I also checked the character code for paragraph break/pilcrow, it is CHAR(182). I also tried CHAR(8232) and CHAR(8233), the error was “SEARCH couldn’t find the value “ ”.


Please help. Thanks.

MacBook Air 13″, macOS 10.15

Posted on Oct 16, 2022 12:20 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 16, 2022 3:31 PM

Barry has shown that the character is the line feed character, ASCII 10. Unfortunately you cannot use CHAR to create an ASCII 10 character so he showed the copy/paste method of getting the character into the function. Now that we have the REGEX function, though, you can use REGEX to create it. It makes the function easier to read


=SEARCH(REGEX("\n"),C2)


REGEX can be used to generate tab, carriage return, form feed and other characters as well.


5 replies
Question marked as Top-ranking reply

Oct 16, 2022 3:31 PM in response to Tori_A

Barry has shown that the character is the line feed character, ASCII 10. Unfortunately you cannot use CHAR to create an ASCII 10 character so he showed the copy/paste method of getting the character into the function. Now that we have the REGEX function, though, you can use REGEX to create it. It makes the function easier to read


=SEARCH(REGEX("\n"),C2)


REGEX can be used to generate tab, carriage return, form feed and other characters as well.


Oct 16, 2022 2:56 PM in response to Tori_A

The keystroke used to force a second line in a Numbers cell is option-return, which inserts a line break. This invisible character does display a pilcrow when selected, but is findable if selected, copied, ten pasted into a function that needs to find it.

The formula shown below the table is entered in F2 and filled down from there. Hidden rows of column A are empty or contain further examples.

Cells in A2 to A4 have a linefeed (option-Return) after the first word, forcing the second line.

A5 also has a line feed inserted, this one ater the second word.

A6 contains an example where the second and third lines were automatically set using the Wrap setting. The first word is not followed by a line feed, so TEXTBEFORE cannot find its target, and returns a 'couldn't find error.

Text in rows above A6 have a line feed inserted after the first word (or after the digits in 123 in row 4)


Regards,

Barry

Oct 16, 2022 4:04 PM in response to Tori_A

Tori wrote: "Thank you for you response. I tried TEXTBEFORE. I got the error


TEXTBEFORE couldn't find the value "


I did read your post, and was aware of that error, which is why I did some further testing, and wrote this:


"This invisible character does display a pilcrow when selected, but is findable if selected, copied, then pasted into a function that needs to find it."


I do like Badunit's solution, using REGEX, a function I've not yet paid enough attention to, and haven't become comfortable with. 'Back to the books,' I guess! :-)


Happy to see you have a solution.



Numbers couldn't find paragraph break

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.