Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Limitations On Finding Characters.

# Limitations On Finding Characters

by Allen Wyatt
(last updated October 5, 2017)

Harold wonders if there is a limitation of characters in a cell beyond which "Find" will not find a string. He has a lot of text in one cell (22,500 characters) where the string MIMO is near the end, and "Find and Replace" says it's not there. The reason he knew it was there was because he was testing an array formula using the SEARCH function, and it said MIMO was there. Harold thought he had an error in my formula but he seemed to find this Excel limitation instead.

There is no limitation that we can find; Find and Replace should find the text MIMO at the end of the string, no matter how long. (This is dependent on the length limitations for strings in Excel, of course.)

That being said, there is an explanation as to why this probably occurred; a short experiment will illustrate the reason. In cell A1, enter the letters "MIMO." Then, in cell A2, enter the formula =A1. Both of these cells should show the text "MIMO" on the screen.

Now, in cell A5 enter the following formula:

```=SEARCH("MIMO",A1)
```

Copy the formula down one cell, to A6. The result of both formulas should be the number 1, just as you expect—SEARCH finds the text "MIMO" beginning at the first character position in both A1 and A2.

Now, press Ctrl+F and enter "MIMO" (without the quotes) in the Find What box. When you click on Find Next, Excel should select cell A1. When you click Find Next again, it should skip to cell A5. In other words, it bypasses cell A2. What gives? You can clearly see "MIMO" in the cell, but Excel doesn't find it.

The reason is because the default way in which Excel does its searching is to look in formulas, not at the values produced by those formulas. In the worksheet, cell A1 has "MIMO" within the formula (it is the actual contents of the cell), but cell A2 doesn't have it in the formula—it is the result of the formula.

If you want to find "MIMO" in both instances, then you need to change how you use Find and Replace. When you press Ctrl+F to display the Find dialog box, make sure you use the Look In drop-down list to choose Values. When you do the search, Excel bases what it finds on what is shown on the screen. With this setting, Find and Replace works exactly the same way as the SEARCH function, which also bases its results on the cell value, not the underlying formula that results in the value.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9237) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Limitations On Finding Characters.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Peculiar Font Differences

Have you noticed page layout differences when you open a document on different systems? There are a number of reasons why ...

Discover More

When you establish links between data on a target worksheet and data on a source worksheet, those links are typically ...

Discover More

Setting Up Multi-page Columns

Do you need a page layout that features columns that progress vertically across pages instead of horizontally across a ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

##### More ExcelTips (ribbon)

Replacing Only Whole Words in Excel

Excel's Find and Replace capabilities are handy, but they aren't as full-featured as those in Word. One shortcoming is ...

Discover More

Deleting Dates within Text Strings

Finding and replace dates contained within other text in a cell can be a bit tricky. This tip looks at some approaches to ...

Discover More

Replacing Characters at the End of a Cell

The Find and Replace capabilities of Excel can come in handy, but they can't accomplish all your replacement needs. One ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. Youâ€™ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine more than 0?

2019-04-09 14:33:08

Roy

Some things in Excel founder when the length of a string of information reaches values like 32767. Others founder at values in the 6,000 range and the 8,000 range.

I always figured that was a limit of the function, older ones, perhaps written with more limited resources, making, say, 8-bit variables instead of whatever the system can handle. Maybe I was right too.

But, perhaps functions rely also on an underlying "rendering" engine that presents them with whatever, and that's all they get hence their limits on things like length.

If you do as Mike says, but dial the length down by reducing the 700 to whatever (100 puts the length at 4404 and works properly where 200 does not. Sound like a 6,000-ish issue?) and Find begins to work as expected.

No function/formula/Named Range/etc. is involved, just a clear limit on how far into the string Find can go. Since MS's general approach is something that overloads just fails, too bad ("NO! Too bad for you! And I won't tell you why!"), and presents an error ("graceful" fail), one suspects it is not that Find overloads and fails "ultra-gracefully" - just stopping on one cell's content with no warning that it did so, but presenting other results (not stopping either, put a good one after a bad one and it finds the good one, so not stopping at first failure and missing 2,000 good ones that follow).

The limit I find here is length 8192 - which should be familiar to anyone who has ever looked at powers of 2 past 4096. (The 32767 thing is 1 less tha 32768 which is four times this length. I never did see offhand where the 6,000 range limits arise from.)

Find either stops at that length or is never presented anything longer than that length to start with.

So... there IS a limit on Find. However it arises.

2015-09-17 19:24:53

Mike

If using MATCH, the limitation on the maximum number of characters in a text box being searched in 255. Beyond this you will an #N/A result even if the text string is found in the cell.

This is annoying - now to find a work around

2015-04-08 03:58:34

Brooke

Thank you Allen, the only post I have found that could help me with this annoying problem.

2014-08-24 21:09:27

GlobalUniqueMike

The limit for Excel's depth of string search in a cell using the UIs Find & Replace is 8192 characters. The solution is to use VBA, which will search to any depth.

2014-03-24 09:57:19

Bryan

This tip is not correct. Here's how to replicate Harold's problem:

1) Type "The quick brown fox jumped over the lazy dog" in cell A1
2) In cell A2 type =REPT(A1,700)&"asdf"
3) Copy A2 and choose "Paste Special -- Values" in A3
4) Ctrl+F search for "the" (Within Sheet, Search By Rows, Look in Formulas). Find will show you A1 and A3. This is the expected behavior.
5) Do the same search as (4), but search for "asdf". To be consistent, we should see A2 and A3, but Find will ONLY show you A2. This is the error Harold described.

While A3 is not a formula, we have clearly demonstrated that text values are searched as formulas when the result is early enough in a cell. If you know that you should have a result and the text is very large, change Look in to Values and Find will return A2 and A3.

##### This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.