Hi All

I want VBA code that will perform the following steps. The Table1 has following fields: ScanDate,NewBatchNo,BatchNo,PolicyNo

1. First of all look into Table1 the scandate<=29082014 and then check if there is No NewBatchNo of the corresponding record then capture its corresponding BatchNo of each record whose scandate<=29082014

2.Then check for the batchno that we have captured in another table Table2 and if its present then return corresponding PolicyNo. Now keep on searching that policy no in Table2 as it could be present 50 times in the table and then return corresponding batch numbers in excel sheet of that Policy No as below:

BatchNo - Policy No - Batch No1 - Batch No2 - Batch No3 ---------------

I hope i made it clear. ANy questions please do ask me.

Thanks