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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,216,212
Messages
6,129,546
Members
449,515
Latest member
lukaderanged

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