I currently use Excel Version 2003 (It is okay, even if macro is for Excel2007)
Data Range A:O
Row data could differ from 2,000 to 6,000 rows (having 4 days data)
Column O has Date Data in format dd-mmm-yy
All data in its current form is arranged in Ascending order, based on Date Data in Column O
I need a VBA Macro Procedure that could-
1) Sort Data in Column A:O,
first on Column B, then sort on
Column D, then sort on
Column O, then sort on
Column C
2) Above would line up 4 days dataset based on date, but few record could be for less than 4 days, say, only for 1st, 2nd and 3rd days, but not for 4th day, or for 1st,3rd,and 4th day, but not for 2nd day and so on, which should be deleted, as each record set should be for 4 days, in continuity. Shortly, Each data should be for minimum 4 days, if not, entire row should be deleted.
For Clarity purpose in attached workbook having sample data,
a) Sheet1 (Named as - RAWDATA) - Contains RAW data
b) Sheet2 (Named as - Sorted on B D O C) shows, how data should be organised after sorting per criteria given in 1) above,
c) Sheet2 (Named as - Sorted on B D O C) Highlighted rows in Grey Color shows where data is not for 4 days sequentially, and hence such row should be deleted
d) Sheet3 (Output) Final Output data is given, just for sample basis, each data set for 4 days, arranged sequentially.
Data in Sheet3 is just sample output, done manually currently, so restricted till rows 72
Macro should process and bring the desired data in Sheet1 itself, where raw data was residing originally.
Bookmarks