Hello Excel experts,
I have a long Excel with the following text:
"We must have this must have" Text is in one cell seperated with empty spaces
Desired result is:
"We must have this"
Any VBA macro to clean this out?
Thanks in advance
Hello Excel experts,
I have a long Excel with the following text:
"We must have this must have" Text is in one cell seperated with empty spaces
Desired result is:
"We must have this"
Any VBA macro to clean this out?
Thanks in advance
Try this
1. Copy code below
2. Press Alt and F11 on your keyboard to open VB Editor
3. Click on Insert and select Module
4. Paste code into Module and close VB Editor.
Don't forget to save your worbook as Macro-Enabled workbook.
then use FORMULA![]()
Please Login or Register to view this content.
Formula:
Please Login or Register to view this content.
v A B 1 We must have this must have We must have this
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Quicker (to solve - took me 1 minute) with a formula
in B1
IF(AND(RIGHT(A1,10)=" must have",LEN(A1)>10),LEFT(A1,LEN(A1)-10),A1)
Regards
Special-K
Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.
Dear Alkey,
thanks a lot for your help and quick answer. I followed all steps, saved the workbook with macro-enabled option. I get the following error message when I copy the formula:"Ambiguous name detected: RemoveDupes"
error message.png
That means you have another procedure with the same name "RemoveDupes" so change the old one to "RemoveDupesOld"
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks