Excel Formula for Finding Repeated Words in a Cell


Share on facebook
Share on twitter
Share on linkedin


If you ever need to know whether a particular word is repeated in a cell (for eg: a file extension or telephone number or name of the customer) here is how you can find it.


We are using substitute() to replace the second occurance of a particular word and then compare this with original cell contents. If both are not equal, we know that the word is repeated.

For eg: =if(lower("all cats are dogs, but not all dogs are cats")<>SUBSTITUTE(lower("all cats are dogs, but not all dogs are cats"),lower("cat"),"",2),"Yes","No") would return “yes”

See related posts for more text processing using excel hacks.

Share on facebook
Share on twitter
Share on linkedin

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Chandoo is an awesome teacher

– Jason

Excel formula list - 100+ examples and howto guide for you

100 Excel Formulas List

From simple to complex, there is a formula for every occasion. Check out the list now.

20 Excel Templates

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Weighted average formula in excel

Weighted Average in Excel [Formulas]

Learn how to calculate weighted averages in excel using formulas. In this article we will learn what a weighted average is and how to Excel’s SUMPRODUCT formula to calculate weighted average / weighted mean.

What is weighted average?

Wikipedia defines weighted average as, “The weighted mean is similar to an arithmetic mean …, where instead of each of the data points contributing equally to the final average, some data points contribute more than others.”

Calculating weighted averages in excel is not straight forward as there is no built-in formula. But we can use SUMPRODUCT formula to easily calculate them. Read on to find out how.

11 Responses to “Excel Formula for Finding Repeated Words in a Cell”

  1. kidakaka says:

    Nice Chandoo!! So I can now do pattern matching and tracking!

  2. Michelle says:

    Very useful!!! I had no idea it could be done... thank you!!

  3. [...] bookmarks tagged repeated Excel Formula for Finding Repeated Words in a Cell saved by 1 others     shikaiangela bookmarked on 11/11/08 | [...]

  4. azmat says:

    hi chandoo,
    i got this below formulae on another site which picks all the text appearing after "/" in a cell....however i can't understand how it works....specially if you could tell me what does this REPT function and 255 value does in this formulae.....

    =TRIM(RIGHT(SUBSTITUTE(B23,"/",REPT(" ",255)),255))

    u can call me a novice wrt formulaes......

  5. Chandoo says:

    @Kida... yeah, you can do some basic pattern matching using this other text manipulation functions.

    @Michelle: you are welcome 🙂

    @Azmat: Thanks for sharing this formula with all. Even I didn't know about this and it definitely goes in to my favorite formula tricks.

    here is how it works:
    - the formula produces portion of the cell contents after last "/" symbol.
    - assuming, the last part is not longer than 255 characters (usually the case)
    - It replaces every "/" with 255 spaces (the rept() function is doing that)
    - Now, it uses right() to extract right most 255 characters. Which probably has a bunch of spaces and then the last portion and another bunch of space.
    - Finally it uses trim to cut down spaces to provide just the string.

    If your string has more than 255 characters after the last "/" symbol, you can use even larger number like 999 in rept() and right().

  6. Glenn says:

    Is there a formula if I want to see if a word is repeated in a column?

  7. Chandoo says:

    @Glenn you can try countif()

    assuming you want to see if word "Glenn" is repeated in the range C1:C20, write something like =IF(COUNTIF(C1:C20,"*Glenn*")>1,"Repeated","Not Repeated")

  8. Mike says:

    Great formula! Thanks so much for posting it.

  9. Tarun says:


    I want to know what text is repeated maximum number of time in a row.

    Eg. Ram, Amitabh, Ravan, Ram, Sita, Tarun, Ram, Chandoo
    should result Ram (3 times)

    Nos. of time Ram is repeated can be calculated by countif function, but how to find what Text is repeated maximum times?

  10. Riduan says:

    Please help!!! Looked everywhere but can't get this to work.

    I have a column where each row containing different sentences. How do I check for duplicate word(s) in each cell in this particular column of various sentences?

Leave a Reply