View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Find Numeric data

"Rick Rothstein (MVP - VB)" wrote...
With the following in A1:A8 (cell contents, i.e., .Formula properties
rather than .Text properties),

....

[removing quoting angle brackets for clarity]
0
0.79
1.79
79
79.01
179
1079
1079.79

That is, these are all their respective cells' .Formula properties, so they
would also be the CStr results of their cells' .Value properties, and the
result of the formula =COUNT(A1:A8) is 8.

Then I number-format them as

#,##0.00

** This is the difference!! **

. . . then if I start Edit/Find and enter 79 (or any variation of it) in
'Find what', . . .


Enter

79.00

(5 characters in total) as 'Find what'

. . . change 'Look in' to Values and check 'Match entire cell contents',
and click Find All... Excel displays a dialog box saying "Microsoft Office
Excel cannot find the data you're searching for."... Do you see something
different?


Yes, using the simpler number format

#,##0.00

as both the number format for A1:A8 and the optional search format for the
Edit Find menu command, Excel 2003 returns a match for cell A4. However,
when I change the number format for both A1:A8 and the optional search
format to

#,##0.00_);[Red](#,##0.00)

I also get the dialog saying no matches found. **BUT** that's because
positive numbers would have single trailing spaces, so 'Find what' would
need to be changed to

[79.00 ]

without the square brackets, which I only included to highlight the
MANDATORY trailing space. When you add the trailing space, Excel finds cell
A4. The point here is when using optional search number formats, Edit Find
is searching cells' .Text properties, and your 'Find what' needs to conform
to what the cell would display.