Hi all,
I've had a search but I can't really find what I'm trying to do.....
I'm running through cells and I want to only use cells that have a date within the next year
The code I have is this:
(PLANWST is the column reference of my date column)
The code doesn't seem to work and I think it's this bit that's wrong:
Any help appreciated
Thanks
Tom
I've had a search but I can't really find what I'm trying to do.....
I'm running through cells and I want to only use cells that have a date within the next year
The code I have is this:
Code:
With CreateObject("scripting.dictionary")
For Each cl In Ws2.Range("A10", Ws2.Range("A" & Rows.Count).End(xlUp))
If Cells(cl.Row, PLANWST).Value < (Date + 365) And Not .exists(cl.Value) Then .Add cl.Value, Array(cl.Offset(, 1).Value, cl.Offset(, 3).Value, cl.Offset(, 4).Value, cl.Offset(, 5).Value, cl.Offset(, 6).Value, cl.Offset(, 7).Value, cl.Offset(, 8).Value, cl.Offset(, 9).Value, cl.Offset(, 10).Value)
Next cl
(PLANWST is the column reference of my date column)
The code doesn't seem to work and I think it's this bit that's wrong:
Code:
If Cells(cl.Row, PLANWST).Value < (Date + 365)
Any help appreciated
Thanks
Tom