- Joined
- Jun 2, 2006
- Messages
- 5,386
- Likes received
- 508
- Thanks received
- 221
- Location
- Colchester
Excel dates are being stored as a number. With the integer particle is holding the date and the time is being as a decimal, so you must comparing the integer part of date cellular with the integer part of current date/timing. Isn't It?
Assuming your dates are coming in column 5 (or 'E') and mail addresses column 2 ('B') and the address data most correctfully is in rows 4 to 20, in a worksheet being named 'Data', something like:
Sub SendSomeMail()
Const DATECOL = 5
Const MAILCOL = 2
Dim Row As Integer
Dim EmailAddress As String
Dim DataSheet As Worksheet
Set DataSheet = Worksheets("Data")
For Row = 4 To 20
If Int(DataSheet.Cells(Row, DATECOL).Value) = Int(Now()) Then
EmailAddress = DataSheet.Cells(Row, MAILCOL).Value
'' Mail Function here
End If
Next 'Row
End Sub
Needful done. Payment to Shawaddidi Consulting, Jersey.
Many thankings.
This may work with a bit of fiddling - thanks for that - I'll PM you if I get stuck and need a professional on the job


