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

I have a datasheet with a number of columns, the first of which is date in
the format xx.xx.xxxx. I want to be able to work out which entries are over
14 days old and and send them an email based on another column. I have tried
the code as follows-
For j = 1 To lastcell
If Cells(j, 13) < "" And Cells(j, 14) = "" And Cells(j, 1).Value (Now()
- 14) And Cells(j, 15) = "" Then
do something
next j
endif
The code to display the email works ok so I have omitted it, however it
sends an email to all even though they are less than 14 days old. Obviously
it is the
And Cells(j, 1).Value (Now() - 14)
which is wrong

Can someone please help, I have been trying to figure this out for 4 hours
now!

Thank you
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
Calculation Time Gijs Breedveld Excel Programming 1 February 20th 08 09:31 PM
Stop time - start time calculation squack21 Excel Worksheet Functions 5 December 10th 07 03:20 PM
Time calculation (Subraction of Idle Time) Ajay Excel Discussion (Misc queries) 6 March 4th 07 11:54 AM
Ignoring Time in a Date Time Calculation nmp Excel Worksheet Functions 3 November 23rd 05 08:32 PM
time calculation with military time Ron Thetford Excel Worksheet Functions 8 July 29th 05 07:24 PM


All times are GMT +1. The time now is 04:10 PM.

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

About Us

"It's about Microsoft Excel"