I apologise for creating a new thread. AlphaFrog helped create a macro for my previous post. I have been asked to delete rows that are between the Maintanance rows. After the copy of the Maintanance row has been inserted, the 'Ticket Open' dates for the next rows are less than 'Ticket Closed' should be deleted.
Example
Maintanance row and dates found
next row with dates less than Maintanance row date
next row with dates less than Maintanance row date
next row with dates less than Maintanance row date
Insert copy of Maintanance row coz the next row dates are not less than Maintanance row dates
THEN DELETE THE 'next row with dates less than Maintanance row date' rows
The current macro processes are;
1. if value in column I is 'Maintanance', (n.b. we will call row the 'Maintanance row) then check if the 'Ticket Open' dates for the next rows are less than 'Ticket Closed' for the 'Maintanance' row
2. Insert a copy of the 'Maintanance row after the last row whose 'Ticket Open' is less than the 'Ticket Closed' for the 'Maintanance' row
3. 'Ticket Open' and 'Ticket Closed' for the inserted row should be the same as the 'Ticket Closed' for the 'Maintanance' row
4. then look for the next Maintanance row in column I and repeat same procedure
I have attached the file with row I had to insert manually after a macro I created failed. The original file has more than 500 Maintanance rows.
The Maintanance row is in row 6. I inserted a copy of the 'Maintanance' row in row 10.
HTML Code:
Bookmarks