Dear Gurus,
I have a complex issue to be solved (complex enough for me at this moment). Please help me achieve this VBA code.
Please find the link to the sample file here: https://rapidshare.com/files/2211042122/Sample.xlsx
I have a list of records with Date and Time, from this we need to scan through the time and pick those samples at designated timings. E.g: There are 50 samples with date and time as below:
I have to pick the samples at 00:30, 1:30, 2:30 and 3:30 (I need to hardcode them into variables, as the intervals might change to 2 hours instead of 1hr). So in case of the last two records at "3:26 & 3:37", I'll pick the "3:26" sample and mark it with a "1" in the cell adjacent to it. Similarly between records with "2:23 & 2:34", I need to pick "2:23" (Ofcourse I got the data sorted in ascending order of time).
One more small additional requirement is whenever there is a change in the "Lot Number", a sample got to be SELECTED, whether they fall in the time frame or not, in addition to the other samples.
I am unable to achieve this logic. Your help will be greatly appreciated.
Thanks in advance.
Regards,
RK.
I have a complex issue to be solved (complex enough for me at this moment). Please help me achieve this VBA code.
Please find the link to the sample file here: https://rapidshare.com/files/2211042122/Sample.xlsx
I have a list of records with Date and Time, from this we need to scan through the time and pick those samples at designated timings. E.g: There are 50 samples with date and time as below:
I have to pick the samples at 00:30, 1:30, 2:30 and 3:30 (I need to hardcode them into variables, as the intervals might change to 2 hours instead of 1hr). So in case of the last two records at "3:26 & 3:37", I'll pick the "3:26" sample and mark it with a "1" in the cell adjacent to it. Similarly between records with "2:23 & 2:34", I need to pick "2:23" (Ofcourse I got the data sorted in ascending order of time).
One more small additional requirement is whenever there is a change in the "Lot Number", a sample got to be SELECTED, whether they fall in the time frame or not, in addition to the other samples.
I am unable to achieve this logic. Your help will be greatly appreciated.
Thanks in advance.
Regards,
RK.