gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
In excel I want to extract 'Aurelie Villard' from cell "Update Membership : Aurelie…
- User
In excel I want to extract 'Aurelie Villard' from cell "Update Membership : Aurelie Villard - eWise/Wise - R&D B&P User", how to make the function?
- Assistant
To extract the name "Aurelie Villard" from the string "Update Membership : Aurelie Villard - eWise/Wise - R&D B&P User" in Excel, you can use a combination of text functions. Here's one way to do it using the
MID,SEARCH, andLENfunctions:Assuming the full string is in cell A1, you can use the following formula:
excel=MID(A1, SEARCH(": ", A1) + 2, SEARCH(" -", A1) - SEARCH(": ", A1) - 2)Explanation:
-
SEARCH(": ", A1) + 2:
- This finds the position of ": " in the string and adds 2 to start extracting right after this punctuation and space.
-
SEARCH(" -", A1):
- This finds the position of the next " -" in the string, which indicates where the name ends.
-
MID function:
-