Hi,

I'm reading in a csv file through a macro and coping it into a worksheet.

But as I read this file in, I'd like to check three columns within the array (I've named them here as Task_ID, Forecast_Date, and Status), to see if the row I'm reading in has the same values for these fields, and then a more recent "DATE" field. So I'm actually interested in four fields (but only to check if three of them are the same and then the last one is different).

So as I read this data:

ID Date User Project_PM Project ID Task_ID Task_ID_Bid Task Name Melb_Net Other_Net Other_Sub_Net Disbursements Forecast Date Task_Forecast_Amount Task_Forecast_Time Status Percentage Comment
1 1/02/2014 9:00 RC RC P114011 1 1.1 First task 200 100 100 1/02/2014 200 2 Forecast 1
2 1/02/2014 9:00 RC RC P114011 2 1.2 Second task 200 100 100 1/02/2014 200 4 Forecast 1
3 1/02/2014 9:00 RC RC P114011 3 1.3 Third task 200 100 100 1/02/2014 200 16 Forecast 1
4 1/02/2014 9:00 RC RC P114011 4 1.4 Fourth task 200 100 100 1/03/2014 200 12 Forecast 1
5 1/02/2014 9:00 RC RC P114011 5 1.5 Fifth task 200 100 100 1/03/2014 200 22 Forecast 1
6 1/02/2014 9:00 RC RC P114011 6 1.6 Sixth task 200 100 100 10 1/03/2014 200 4 Forecast 1
7 2/02/2014 9:00 RC RC P114011 1 1.1 First task 200 100 100 1/02/2014 200 12 Forecast 0.5
8 2/02/2014 9:00 RC RC P114011 1 1.1 First task 200 100 100 1/03/2015 200 12 Forecast 0.5



I'd like the actual worksheet to only be populated with this data:

ID Date User Project_PM Project ID Task_ID Task_ID_Bid Task Name Melb_Net Other_Net Other_Sub_Net Disbursements Forecast Date Task_Forecast_Amount Task_Forecast_Time Status Percentage Comment
2 1/02/2014 9:00 RC RC P114011 2 1.2 Second task 200 100 100 1/02/2014 200 4 Forecast 1
3 1/02/2014 9:00 RC RC P114011 3 1.3 Third task 200 100 100 1/02/2014 200 16 Forecast 1
4 1/02/2014 9:00 RC RC P114011 4 1.4 Fourth task 200 100 100 1/03/2014 200 12 Forecast 1
5 1/02/2014 9:00 RC RC P114011 5 1.5 Fifth task 200 100 100 1/03/2014 200 22 Forecast 1
6 1/02/2014 9:00 RC RC P114011 6 1.6 Sixth task 200 100 100 10 1/03/2014 200 4 Forecast 1
7 2/02/2014 9:00 RC RC P114011 1 1.1 First task 200 100 100 1/02/2014 200 12 Forecast 0.5
8 2/02/2014 9:00 RC RC P114011 1 1.1 First task 200 100 100 1/03/2015 200 12 Forecast 0.5


I have used the open csv data vba script from here: http://stackoverflow.com/questions/9...ba-performance

I'm assuming that the check of data is inserted around the section that has:

For i = 1 To locNumRows
For j = 0 To UBound(locLinesList(i), 1)
locData(i, j + 1) = locLinesList(i)(j)
Next j
Next i


Thanks for you help!

Rob