Hi - wondering if anyone can help....
I am trying to compare column values from a defined cell with a date in to see if they are equal or in front of the defined date.
I have the following code:
Thanks
TomL
I am trying to compare column values from a defined cell with a date in to see if they are equal or in front of the defined date.
I have the following code:
Code:
Dim cl As Range
Dim lrow As Long
Dim Srchrng As Range
Dim Fstart As Date
Dim Fend As Date
Fstart = Sheets("SETTINGS").Range("W2").Value
Fend = (Fstart + 14)
MsgBox Fstart
MsgBox Fend
lrow = Sheets("SHEET 1").Cells(Rows.Count, 1).End(xlUp).Row
Set Srchrng = Sheets("SHEET 1").Range(Cells(10, PLANWST), Sheets("SHEET 1").Cells(lrow, PLANWST))
For Each cl In Srchrng
If Not IsEmpty(cl) And cl.Value >= Fstart Then MsgBox "Found"
Next cl
Thanks
TomL