Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. 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: Finding All Instances of a Value.

Finding All Instances of a Value

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


1

Mike uses Ctrl+F to find information within cells. This works great with text, but it doesn't do what he needs it to do when searching for numbers. For instance, if he searches for "1500" then it will find any cell that contains the value, regardless of formatting (such as 1500, 1,500, 1,500.00, or $1,500), provided that Mike sets the "Look In" setting in the Find dialog box to "Formulas." But, it won't find 1500 when that value is the result of a formula, such as =750*2.

If Mike sets the "Look In" setting to "Values," then Find only finds the value 1500 along with any formula that returns 1500, provided he doesn't have the cell formatted in some other manner (such as a format that shows the result as $1,500). Mike wonders how he can use Find to find any variation of 1500, regardless of formatting or whether the value is derived by formula or not.

The short answer is that this cannot be done. When you use Excel's Find tool, the Find dialog box includes ways to instruct Excel where it should look for what you want; this is the "Look In" drop-down list. There are three options in the drop-down list:

  • Formulas
  • Values
  • Comments

Looking in Comments should be self-explanatory—Excel limits its searching to any comments in the worksheet. The other two options ignore comments, but find information differently from each other. As Mike notes, a setting of Formulas will find any cell that contains 1500, regardless of the way that the cell is formatted. It won't, however, find a result of 1500 if the value 1500 is not in the formula itself. For example, consider the following two formulas:

=750*2
=1+1500-1

The result of both of these is 1500. However, searching for 1500 with "Look In" set to Formulas will not find the cell with the first formula, but it will find the cell with the second formula. Why? Because the first formula doesn't contain 1500, while the second one does.

If you change the "Look In" drop-down setting to Values, then Excel finds formula results that are 1500, provided there is no formatting that makes the value look differently (such as adding commas or dollar signs).

Regardless of the setting of the "Look In" drop down, something is missing—Excel ignores some results or some values that you don't want ignored. The only way that we've been able to get around this problem and expand what Excel will find is to do a search for "1*500" (without the quote marks) with the "Look In" setting as Values. Excel will then find the 1500 even if there is a dollar sign and a comma in what is shown.

The drawback to this approach is that using the search wildcards in this manner (the asterisk finds any number of characters) results in matches for values such as 321500 or 32178500. This is, of course, because those numbers include the number 1 followed by any number of characters and then the numbers 500. For some instances this can be a bigger drawback than the original problem.

Other than this workaround, we know of no other solution short of creating a macro to do your searching.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8314) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Finding All Instances of a Value.

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

Finding the Path to the Desktop

Figuring out where Windows places certain items (such as the user's desktop) can be a bit frustrating. Fortunately, there ...

Discover More

Graphics and Line Height

If the in-line graphics in your document appear "chopped off," it could be directly related to the formatting within the ...

Discover More

Copying Rows and Columns with the Mouse

Word allows you to do quite a few editing tasks using the mouse. If you want to copy rows or columns in a table, you can ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Allowing for Prefixes and Suffixes in Find and Replace

Excel includes a rather simplistic find and replace capability. If you have more complex needs, you'll need to seek out ...

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

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
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 6 - 0?

2022-10-02 11:01:14

J. Woolley

My Excel Toolbox includes the following dynamic array function to return a list of cells matching Value:
=ListMatchingCells(Value,[LookIn],[MatchCase],[MatchEntire],[AllSheets])
Value can be a numeric or text constant or a formula's result or a cell (like A1) with a non-blank value; * and ? are wild card characters and ~ is the escape character, the same as Find (Ctrl+F). If LookIn is "All" then matches are reported for Values, Formulas, Notes, and Comments. For more about ListMatchingCells, see my recent comments here: https://excelribbon.tips.net/T011524_Searching_for_a_Value_Using_a_Function.html
Also, see https://sites.google.com/view/MyExcelToolbox/


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.