Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Comparing dates

What's weird is if I change the = to a <

If (testdate < DateValue("5/1/2007")) Then
cellSTBpaste = "Y" & ActiveCell.Row
cellorderpaste = "X" & ActiveCell.Row
Else
cellSTBpaste = "AB" & ActiveCell.Row
cellorderpaste = "AA" & ActiveCell.Row
End If

then everything goes through the Else and nothing through the If. Any
ideas?


Can you put a break point on this If statement (click the gray border on the
left of it to produce a red dot and highlight the line in red), then run
your macro and when it stops, issue a ?testdate command in the Immediate
window and tell us what prints out?

Rick

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
Comparing 2 Dates JWeaver Excel Worksheet Functions 3 August 14th 08 09:01 PM
Comparing Dates fubdap Excel Discussion (Misc queries) 3 September 27th 07 03:53 PM
Comparing two dates using between. BerkshireGuy Excel Programming 1 April 24th 07 12:47 AM
Comparing 3 dates Steve Excel Worksheet Functions 1 May 9th 06 12:10 PM
comparing dates Myriam Excel Programming 3 October 11th 04 04:49 AM


All times are GMT +1. The time now is 05:37 PM.

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"