Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Date question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Date question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Date question

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Date question

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Question [email protected].(donotspam) Excel Discussion (Misc queries) 2 May 23rd 08 03:30 PM
Date Question GMc[_2_] Excel Worksheet Functions 3 May 16th 08 06:49 PM
Date question [email protected] Excel Worksheet Functions 2 September 2nd 06 10:14 PM
This is a date question... Robert Excel Discussion (Misc queries) 4 August 2nd 05 04:22 PM
Another Date Question Kdub via OfficeKB.com Excel Discussion (Misc queries) 1 June 30th 05 01:09 AM


All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"