Find Tool in worksheet retrieving value not the same as entered data

SBF12345

Well-known Member
Joined
Jul 26, 2014
Messages
614
I was attempting a find in vba...it was giving a problem so I tried to find the same value with the find tool in the worksheet.

With all cells selected I opened find and entered the date "02/10/10", hit "find next" and got the result "12/10/10". What the heck? How, Why?

anybody had this occur before?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try this :
Code:
Sub FindDate()
Dim dte As Date, rng As Range, i As Variant, cel As Range
dte = "02/10/10"
Set rng = [A1:A10]
i = Application.Match(CLng(dte), rng, 0)
If Not IsError(i) Then Set cel = rng(i)
End Sub
 
Upvote 0
With all cells selected I opened find and entered the date "02/10/10", hit "find next" and got the result "12/10/10". What the heck? How, Why?

If you enter in Find 2/10/10 and 02/10/10 does not exist in the selection, and 'Match entire cell contents' is not checked, Find will go to the first partial match.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top