Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a sample bit of code:
If Cells(iRow + 11, 1).Value < date_L119 Then .Cells(iRow + 11, 22).Value = "NP" End If which works great !! This doesn't work. How do I define my dates? If .Cells(iRow + 11, 1).Value "06/01/2002" Then .Cells(iRow + 11, 22).Value = "0" End If thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mona,
try: If .Cells(iRow + 11, 1).Value #06/01/2002# Then .Cells(iRow + 11, 22).Value = "0" End If -- Hope that helps. Vergel Adriano "Mona" wrote: I have a sample bit of code: If Cells(iRow + 11, 1).Value < date_L119 Then .Cells(iRow + 11, 22).Value = "NP" End If which works great !! This doesn't work. How do I define my dates? If .Cells(iRow + 11, 1).Value "06/01/2002" Then .Cells(iRow + 11, 22).Value = "0" End If thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you!!
"Vergel Adriano" wrote: Mona, try: If .Cells(iRow + 11, 1).Value #06/01/2002# Then .Cells(iRow + 11, 22).Value = "0" End If -- Hope that helps. Vergel Adriano "Mona" wrote: I have a sample bit of code: If Cells(iRow + 11, 1).Value < date_L119 Then .Cells(iRow + 11, 22).Value = "NP" End If which works great !! This doesn't work. How do I define my dates? If .Cells(iRow + 11, 1).Value "06/01/2002" Then .Cells(iRow + 11, 22).Value = "0" End If thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use # signs to create a date value or variable.
i.e. #06/01/2002# is a date. HTH tbone On Thu, 26 Apr 2007 14:54:02 -0700, Mona wrote: I have a sample bit of code: If Cells(iRow + 11, 1).Value < date_L119 Then .Cells(iRow + 11, 22).Value = "NP" End If which works great !! This doesn't work. How do I define my dates? If .Cells(iRow + 11, 1).Value "06/01/2002" Then .Cells(iRow + 11, 22).Value = "0" End If thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Question | Excel Discussion (Misc queries) | |||
Date Question | Excel Worksheet Functions | |||
Date question | Excel Worksheet Functions | |||
This is a date question... | Excel Discussion (Misc queries) | |||
Another Date Question | Excel Discussion (Misc queries) |