Hello,
I am trying to find out how to extract the text prior to a line break. I am trying to find a way to use FIND/LEFT, however, I can not find a way to use FIND in conjunction with a line break....
Hello,
I am trying to find out how to extract the text prior to a line break. I am trying to find a way to use FIND/LEFT, however, I can not find a way to use FIND in conjunction with a line break....
Last edited by Dulanic; 05-17-2010 at 02:06 PM.
something like:
=LEFT(A1,FIND(CHAR(10),A1)-1)
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Tried that, that just enters a line break instead of searching for one
Ends up looking like:
=LEFT(A1,FIND(CHAR(10),A1)-1)
,A1)
And it throws me a formula error.
Worked now when I typed it out instead of pasting it in the formula bar....dunno what the problem was.
=LEFT(A2, SEARCH((CHAR(10)), a2))
I haven't been able to make the above solutions work for me in my situation. I want to extract a string of text from a cell which has often multiple lines but not always ordered in the same way.
I am currently using =MID(G2,SEARCH("keAdHocDsc",G2,1)+11,25)
However, sometimes my string is not 25 characters so i need to be able to have this part of the syntax dynamic. I always want the string in quotes after "keAdHocDsc=" but only up to the next line break after. (I also don't need apostrophes in my results if that helps)
Example cell contents 1
keFeeNom='rengte'
keAdHocDsc='Rent & Legal Protection'
keOldCode='273F692F-7792-4D34-AD6B-0F65530F91B8'
keRPSImported={22/05/2021 00:00:00}
keConvRef='a0cbc52c-4814-4f23-899e-7e0642fc75cb'
keAltConvRef='c774f982-dead-4465-adaa-f2891b0730f1'
keRecChgTo={17/10/2022 00:00:00}
Example cell contents 2
keAdHocDsc='Monthly Rent & Legal Protection Admin Fee'
keOldCode='8ACF95F4-54BC-445D-B182-90177C1C8936'
keRPSImported={22/05/2021 00:00:00}
keConvRef='a0cbc52c-4814-4f23-899e-7e0642fc75cb'
keAltConvRef='c774f982-dead-4465-adaa-f2891b0730f1'
keRecChgTo={27/10/2022 00:00:00}
keNAltCode='MMUF'
Administrative Note:
Welcome to the forum.
We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.
Please see Forum Rule #4 about hijacking and start a new thread for your query.
If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks