Hi, is there an easy way to remove duplicate text in a cell? For example:
Cell A1: Ford, Dodge, Ford,
Answer required is Ford, Dodge,
Can someone give me a formula to accomplish this, it seems so easy.
Thanks
Hi, is there an easy way to remove duplicate text in a cell? For example:
Cell A1: Ford, Dodge, Ford,
Answer required is Ford, Dodge,
Can someone give me a formula to accomplish this, it seems so easy.
Thanks
find and replace
, Ford to blank
Eh, can you elaborate please?
Seems so easy, but rather (I may be wrong) isn't so.
Would be easy by UDF, but not by built in formulas.
Best Regards,
Kaper
Guys in fairness, is this the best you can come up with??
who said the best?
your question = an answer
Thanks, but I need a formula or a macro to do this correctly. I'll have a look elsewhere, I thought there were excel experts in here.
I do not think tim's solution is a solution for this issue. So have a look on short UDF and how it works in attached sample file:
it is used as any built-in function.![]()
Please Login or Register to view this content.
Looks pretty expert to me; thanks Kaper. I had no idea one could create a function.
Glad to hear that, hope it will suit also brianmcgee.
As of understanding the function - It's relatively easy to read (almost plain English) one point to notice is that when one adds to a collection (named singles) any item at the item_name key - it will raise an error if there is already such an item in the collection. so after going through all elements in array in a collection there are only single occurences of each item.
Wow Kaper! That's more like it, you are an expert. Works perfectly thank you. Now how do I set that up in the file I'm working on?
While in your file
Alt+F11 Alt+I M
in open window copy the code
close the whole VBEditor window (or just activate main excel window) and save your workbook in one of macro-friendly formats (xls, xlsm, xlsb) - not xlsx!
now you can use this function in this file as any sytandard excel function.
While re-opening the file later, remember to allow macro excecution.
Excellent work, thanks Kaper!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks