Hello,
Working with a scheduling report and trying ultimately to get it down to a line item report with the associate information and their earliest start and latest end for the week. Already made a lot of fixes to the formatting involving junking empty cells and trash data, but running into a road block on some of the trash data.
Here is the format of the report at this point. Names have been changed to protect the innocent.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Agent: 2366 Bacon, Kevin[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[/TR]
[TR]
[TD]5/19/2013[/TD]
[TD]8:30 AM[/TD]
[TD]5:00 PM[/TD]
[/TR]
[TR]
[TD]5/20/2013[/TD]
[TD]8:30 AM[/TD]
[TD]5:00 PM[/TD]
[/TR]
[TR]
[TD]5/21/2013[/TD]
[TD]8:30 AM[/TD]
[TD]5:00 PM[/TD]
[/TR]
[TR]
[TD]5/22/2013[/TD]
[TD]Off[/TD]
[TD]Off[/TD]
[/TR]
[TR]
[TD]Agent: 2366 Bacon, Kevin[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[/TR]
[TR]
[TD]5/23/2013[/TD]
[TD]9:00 AM[/TD]
[TD]5:30 PM[/TD]
[/TR]
[TR]
[TD]5/24/2013[/TD]
[TD]10:00 AM[/TD]
[TD]6:30 PM[/TD]
[/TR]
[TR]
[TD]5/25/2013[/TD]
[TD]Off[/TD]
[TD]Off[/TD]
[/TR]
[TR]
[TD]Agent: 8843 Dinero, Robert[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[/TR]
</tbody>[/TABLE]
So what I need is something that will iterate through the report...such as an while and find the cells in column A that start with "Agent:" It needs to compare that cell to a stored value to see if this "Agent:" is a repeat. If it is then it needs to delete that row and the next one and shift up. If it is not then it overwrites this "Agent:" with the previous one in the stored value and continues the while.
I know what I want to do...but not shure on the code cause I am not great at VBA.
Help?
Oh...if it matters probably need to allow for about 10k line items to iterate through...right now report is at 6k...but allow room to grow.
Thanks!
Working with a scheduling report and trying ultimately to get it down to a line item report with the associate information and their earliest start and latest end for the week. Already made a lot of fixes to the formatting involving junking empty cells and trash data, but running into a road block on some of the trash data.
Here is the format of the report at this point. Names have been changed to protect the innocent.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Agent: 2366 Bacon, Kevin[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[/TR]
[TR]
[TD]5/19/2013[/TD]
[TD]8:30 AM[/TD]
[TD]5:00 PM[/TD]
[/TR]
[TR]
[TD]5/20/2013[/TD]
[TD]8:30 AM[/TD]
[TD]5:00 PM[/TD]
[/TR]
[TR]
[TD]5/21/2013[/TD]
[TD]8:30 AM[/TD]
[TD]5:00 PM[/TD]
[/TR]
[TR]
[TD]5/22/2013[/TD]
[TD]Off[/TD]
[TD]Off[/TD]
[/TR]
[TR]
[TD]Agent: 2366 Bacon, Kevin[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[/TR]
[TR]
[TD]5/23/2013[/TD]
[TD]9:00 AM[/TD]
[TD]5:30 PM[/TD]
[/TR]
[TR]
[TD]5/24/2013[/TD]
[TD]10:00 AM[/TD]
[TD]6:30 PM[/TD]
[/TR]
[TR]
[TD]5/25/2013[/TD]
[TD]Off[/TD]
[TD]Off[/TD]
[/TR]
[TR]
[TD]Agent: 8843 Dinero, Robert[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[/TR]
</tbody>[/TABLE]
So what I need is something that will iterate through the report...such as an while and find the cells in column A that start with "Agent:" It needs to compare that cell to a stored value to see if this "Agent:" is a repeat. If it is then it needs to delete that row and the next one and shift up. If it is not then it overwrites this "Agent:" with the previous one in the stored value and continues the while.
I know what I want to do...but not shure on the code cause I am not great at VBA.
Help?
Oh...if it matters probably need to allow for about 10k line items to iterate through...right now report is at 6k...but allow room to grow.
Thanks!