Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finds date but won't change cell
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finds date but won't change cell
Hi Esau,
just modify the activecell line ... If ActiveCell.Value = "3 /1/2006" Then HTH Carim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finds date but won't change cell
"3/1/2006" is text, but 3/1/2006 is 3 divided by 1 divided by 2006. Probably
not what you intended... -- HTH... Jim Thomlinson "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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finds date but won't change cell
Thanks Worked great I had just about gave up and was looking for some other way
Thanks again -- Esau "Charles Chickering" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
formula the finds value of cell above | Excel Discussion (Misc queries) | |||
Excel 2003 make 1 date cell automatically change another date cell | Excel Worksheet Functions | |||
Need a formula that finds the last used cell in a range | Excel Worksheet Functions | |||
I want tool which finds duplicate date in excel 2003 | Excel Worksheet Functions | |||
a macro which finds last cell in a column | Excel Programming |