Extract data to the right or left of a character

G'Day


I have a whole lot of formulas that I used to use regularly in Numbers however when I copy/paste them now they no longer work. I have attached these so if anyone is able to spot why these no longer work that would be a huge. For this specific issue I need to extract data to the right of the -. See attached. Thank you

MacBook Pro 13", macOS 10.15

Posted on Apr 17, 2020 2:32 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 17, 2020 3:50 AM

Hi ctnic,


If the separator is always space hyphen space, try this.



Formula in B2 =LEN(A2)

Formula in C2 =FIND(" - ",A2,1)

Formula in D2 =LEFT(A2,C2−1)

Formula in E2 =RIGHT(A2,B2−C2−3)


Hide the intermediate columns if you want.


Regards,

Ian.

6 replies

Apr 17, 2020 6:38 AM in response to ctnic

to locate the "delimiter" (which is, in your case, the " - ", space dash space) you can do this:


I prefer to use extra columns because they simplify the problem.

So I added column B where the start of the delimiter is found:


B3=FIND(" - ", A3, 1)

C3 will contain the formula to identify the "left" part of the phrase

C3=LEFT(A3, B3−1)


The right side:

D3=RIGHT(A3, LEN(A3)−B3−3+1)




Apr 17, 2020 7:35 AM in response to ctnic

maybe you'd like to share the error. Click the triangle in the cell reporting the error and tell us what the error is.


Also a screenshot of the selected cell with the error is helpful



Since I posted (and so did Ian) formulas that are working, maybe you should try the formulas we posted. Once the problem is understood you can re-arrange back to a single formula


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Extract data to the right or left of a character

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