Hi,
I have a VB-challenge in making a code that runs through a kind of table in sheet1 which is queried by SQL/ADO and check for each ID (col A) or NAME (col B) what the last update date is (col C), - if the last update date is older than before yesterday (let's say yesterday is always 26-07-2011 for testing purpose) then this ID and NAME should be brought to a new table/matrix which its rows labels are the ID and NAME and column labels are the color in which the ID and NAME is contained, - and in the matrix itself should be stated how many days the update is lacking, eg if eddy has last update date 24-07-2011, then -2 should appear in the corresponding matrix-field.
Look at my workbook for a much easier explanation.
The code contains error, especially the lastdate.rowindex --i don't think it works.
My challenge is indeed the loop where every time there has been a too old date for an ID/NAME and this ID/name get listed then the next record for the next ID/NAME which is too old should appear below the one earlier untill there's no more old dates (the rowindex in .cells(j,7) should vary)...You understand what i mean if you open the file. Note that it's not static table in sheet1..it gets updated so every time an update of the table takes place, i should run the vb-code and then the lacks-matrix should be updated accordingly.
Thanks for any help in advance!
Bookmarks