Problem with VBA "Find" operation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My code (which follows) will not find a matching date.

Partial code:

"With Worksheets(myProject).Columns("AC")
Set FindClose = .Find(myCloseDate, LookIn:=xlValues)"

"myCloseDate" is a date and looks like "3/31/05".

In column "AC" is a formula that returns a date. The formula is:

=EOMONTH(Q119,0)

"FindClose" always comes up equal to "nothing". But there is a matching
date in column "AC".

What am I doing wrong?

Thank you for your assistance.

Don
 
Dave,

Thank you for responding.

I kept playing with the problem and found another solution. If you format
the date column to exactly match the "FindWhat" date, it works. The format,
in my case, needed to be m/d/yyyy rather than my usual choice of m/d/yy.

I'll keep your solution in mind.

Thanks again.

Don
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top