Search : in
By :

VB formatting of excel array by date

ilyaasam, on May 31, 2009 1:33:31 pm BST 
 Report this message to moderators

Hello,

I need help with a visual basic code in excel.
I am trying to validate rows in 2 sheets. If column 6 is a date from two days before the current date, the whole row needs to be copied to a third sheet.

the current code i'm using looks like this
If Cells(rwindex, 2) <> "" And Cells(rwindex, 6) = "" Then

Currently this copies all the rows where column 6 is blank into a third sheet.

I dont have a problem with the copying bit, but what i am trying to say is
And Cells(rwindex, 6) > today()-2 then copy...

Are there any suggestions as to how i can get this to work?

Thanks,

Configuration: Windows Vista
Firefox 3.0.10