View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Charles Chickering Charles Chickering is offline
external usenet poster
 
Posts: 272
Default Finds date but won't change cell

Because Excel thinks you mean 3 divided by 1 divided by 2006
Try this instead:
If ActiveCell = DateValue("3/1/2006") Then

--
Charles Chickering

"A good example is twice the value of good advice."


"Esau" wrote:

Can some one tell me why it won't change cell H12
It finds the date

-- Range("F5").Select
Cells.Find(What:="3/1/2006", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False).Activate
If ActiveCell = 3 / 1 / 2006 Then
Range("H12").Value = 1
Esau