Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Finding All Instances of a Value.
Written by Allen Wyatt (last updated April 10, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003
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:
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 (8313) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Finding All Instances of a Value.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
When you use Find and Replace, Excel normally looks through all the cells in a worksheet. You may want to limit the ...
Discover MoreNeed to add some characters to the beginning of the contents in a range of cells? It's not as easy as you might hope, but ...
Discover MoreIf you have a folder that contains dozens or hundreds of workbooks, you may need to search through those workbooks to ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments