Finding Based on Displayed Results

Written by Allen Wyatt (last updated July 16, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


2

Barry wants to be able to search what is displayed in a cell rather than searching what is contained in the cell. He notes that Find and Replace apparently only knows about the formula in the cell, so it fails when looking for the displayed contents. As an example, suppose column A has part numbers and column B has a lookup formula returning the names for those part numbers. Barry wants to be able to search column B for part names that contain a certain string.

The reason that Excel isn't finding what you want is that you need to tell Excel where to look for what you want. Given the scenario you outline, start by displaying the Find tab of the Find and Replace dialog box; the easiest way is to press Ctrl+F. (See Figure 1.)

Figure 1. The Find tab of the Find and Replace dialog box.

The dialog box is very minimal, and if you type in the portion of the part number you want to find, you'll be disappointed in the results, as you have been to date. Instead, before searching, click the Options button to expand the options in the Find and Replace dialog box. (See Figure 2.)

Figure 2. The Find tab of the expanded Find and Replace dialog box.

The key thing to note here is the setting in the Look In drop-down list. There are three possible settings in this drop-down list:

  • Formulas. Excel searches only what is contained in the cells, regardless of how the information in the cell is displayed. It also ignores comments.
  • Values. Excel searches only what is displayed in the cells, ignoring any underlying formulas or comments.
  • Comments. Excel searches only within any comments, ignoring actual cells.

The default search setting is the first one, Formulas. This is why Barry isn't getting the results he wants from his searches. If you change the Look In drop-down list to Values, then the results will be entirely different.

There is one important thing to note. If you use the Replace tab of the Find and Replace dialog box, you'll still note that there is a Look In drop-down list. However, the only option in that variation of the drop-down list is Formulas; there is no Values option. The reason of this is that you can only replace within formulas (the contents of a cell), not within values (what the cell displays).

It should also be noted that the Look In setting is persistent for your entire Excel session. The next time you start the program, however, the setting defaults back to Formulas.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13442) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

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

Creating a Directory in a Macro

One of the things you can do with macros is to work with disk files. As you do so, you may have a need to create a new ...

Discover More

Identifying Missing Numbers in a Consecutive Series

If you have a series of consecutive numbers in a column, you may want to know if it really is consecutive. (In other ...

Discover More

Adding Up Tops and Bottoms

When you are working with sequenced values in a list, you’ll often want to take some action based on the top X or ...

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)

Making All Occurrences Bold

Want to make instances of a given word or phrase bold throughout a worksheet? Here's a way you can make the change quickly.

Discover More

Counting the Results of a Formula Using Find and Replace

Need to get a count of a particular result from a formula? You can use Find and Replace (as described in this tip), but ...

Discover More

Finding and Replacing with Subscripts

Want to use Find and Replace to change the formatting of a cell's contents? You would be out of luck; Excel won't let you ...

Discover More
Subscribe

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

View most recent newsletter.

Comments

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}] (all 7 characters, in the sequence shown) 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 three less than 3?

2022-07-18 07:14:54

Alex Blakenburg

Re: "The reason of this is that you can only replace within formulas (the contents of a cell), not within values (what the cell displays)."

A couple of workarounds if you want to replace constant values and not the content of formulas.
• In replace click on Match Entire cell contents
This will only be true for constants and not for formulas

• Use Goto <F5> Special and Select constants, then when you use replace, it will only update the Selected cells which are the constants.


2022-07-16 09:42:02

J. Woolley

In newer versions of Excel, there will be 4 choices:
Formulas
Values
Notes -- the OLD unthreaded Comments
Comments -- the NEW CommentsThreaded
Whoever decided to assign the NEW name to the OLD object should be fired.


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.

Newest Tips
Subscribe

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

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.