Can you help me with this?
Can you help me with this?
Have you a list of the names somewhere in the sheet? or you want Excel to "understand" which are the names in the string?
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
if you had a list of names that could occur then yes or if you had some way of showing where the names are in the text (some mark like ; or something where the name starts (and preferably stops)) you can do it otherwise you cant tell excel to just pick some random words out from random locations in a string. how do you get these strings and can they be amended at data entry level
The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
<--- If a post helps hit the star
Here, try this:
Formula:
Please Login or Register to view this content.
Never use Merged Cells in Excel
thanks, this is great..
Could you make the formula, so it always returns 2 words after "fra"? If you just have this formula:
=deltekst(A4;søk("fra";A4)+4;255)
I guess instead og 255 in the last expression, I have to write something else.
Sure.
But it will retun Mona ref from Avs.ref 3232 . Fra Mona ref 62
Formula:
Please Login or Register to view this content.
Ups, I see that it works, but could you explain the steps zbor?
=TRIM(LEFT(SUBSTITUTE(MID(A3;SEARCH("Fra ";A3&"Fra ")+4;255);" ";REPT(" ";255);2);100))
You can use Evaluate formula na try to follow steps:
First take (for example) a string Faktura Fra Mona Mona lug 123 and use word from 4th place after FRA (SEARCH("Fra ";A3&"Fra ")+4) onwards (255)
- MID(A3;SEARCH("Fra ";A3&"Fra ")+4;255)
- MID(Faktura Fra Mona Mona lug 123;SEARCH("Fra ";Faktura Fra Mona Mona lug 123&"Fra ")+4;255)
- MID(Faktura Fra Mona Mona lug 123;13;255)
- Mona Mona lug 123
Now replace SECOND space with 255 spaces to get huge gape between second and third word
- SUBSTITUTE(MID(A3;SEARCH("Fra ";A3&"Fra ")+4;255);" ";REPT(" ";255);2)
- SUBSTITUTE(Mona Mona lug 123;" ";REPT(" ";255);2)
- Mona Mona_______________spaces_________lug 123
Now take left 100 characters (it should be enough for two words but won't take thirw word which is 255 chars away. You can change those 100 to 200 for example if first two words are longer.
- LEFT(Mona Mona_______________spaces_________lug 123;100)
- Mona Mona_______________spaces
And TRIM function will remove those extra spaces
- TRIM(Mona Mona_______________spaces)
leaving just
- Mona Mona
Hope it's clear.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks