Hi All, Looking for some help with a VBA code.
Each day I get a data download from one of our systems which compiles all completed, ongoing and cancelled cases.
I then have to manually go through the data to sort into 3 new sheets within the same workbook. With over 20,000 of data each day this can be quite mind numbing and slow.
I would like a code which will look at the status column (D) and depending on the column value, automatically move that whole row to a new sheet.
An example of my data is below
[TABLE="width: 492"]
<colgroup><col span="4"></colgroup><tbody>[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Date input[/TD]
[TD="align: center"]Amount[/TD]
[TD="align: center"]Status[/TD]
[/TR]
[TR]
[TD="align: center"]John[/TD]
[TD="align: center"]01/09/2016[/TD]
[TD="align: center"]£0[/TD]
[TD="align: center"]Awaiting Payment[/TD]
[/TR]
[TR]
[TD="align: center"]Steve[/TD]
[TD="align: center"]10/09/2016[/TD]
[TD="align: center"]£0[/TD]
[TD="align: center"]On hold[/TD]
[/TR]
[TR]
[TD="align: center"]Andy[/TD]
[TD="align: center"]11/09/2016[/TD]
[TD="align: center"]£0[/TD]
[TD="align: center"]Awaiting payment[/TD]
[/TR]
[TR]
[TD="align: center"]Sam[/TD]
[TD="align: center"]20/09/2016[/TD]
[TD="align: center"]£1,000[/TD]
[TD="align: center"]Complete[/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]10/10/2016[/TD]
[TD="align: center"]£500[/TD]
[TD="align: center"]Complete[/TD]
[/TR]
[TR]
[TD="align: center"]Charlotte[/TD]
[TD="align: center"]15/10/2016[/TD]
[TD="align: center"]£0[/TD]
[TD="align: center"]Cancelled[/TD]
[/TR]
</tbody>[/TABLE]
So I would like the code to look and the status column and sort the data as:
Where status = Complete - Move to Completed Sheet
Where Status = Awaiting Payment OR On hold - Move to Ongoing Sheet
Where Status = Cancelled - Move to Cancelled Sheet
Thanks in advance
Ben
Each day I get a data download from one of our systems which compiles all completed, ongoing and cancelled cases.
I then have to manually go through the data to sort into 3 new sheets within the same workbook. With over 20,000 of data each day this can be quite mind numbing and slow.
I would like a code which will look at the status column (D) and depending on the column value, automatically move that whole row to a new sheet.
An example of my data is below
[TABLE="width: 492"]
<colgroup><col span="4"></colgroup><tbody>[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Date input[/TD]
[TD="align: center"]Amount[/TD]
[TD="align: center"]Status[/TD]
[/TR]
[TR]
[TD="align: center"]John[/TD]
[TD="align: center"]01/09/2016[/TD]
[TD="align: center"]£0[/TD]
[TD="align: center"]Awaiting Payment[/TD]
[/TR]
[TR]
[TD="align: center"]Steve[/TD]
[TD="align: center"]10/09/2016[/TD]
[TD="align: center"]£0[/TD]
[TD="align: center"]On hold[/TD]
[/TR]
[TR]
[TD="align: center"]Andy[/TD]
[TD="align: center"]11/09/2016[/TD]
[TD="align: center"]£0[/TD]
[TD="align: center"]Awaiting payment[/TD]
[/TR]
[TR]
[TD="align: center"]Sam[/TD]
[TD="align: center"]20/09/2016[/TD]
[TD="align: center"]£1,000[/TD]
[TD="align: center"]Complete[/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]10/10/2016[/TD]
[TD="align: center"]£500[/TD]
[TD="align: center"]Complete[/TD]
[/TR]
[TR]
[TD="align: center"]Charlotte[/TD]
[TD="align: center"]15/10/2016[/TD]
[TD="align: center"]£0[/TD]
[TD="align: center"]Cancelled[/TD]
[/TR]
</tbody>[/TABLE]
So I would like the code to look and the status column and sort the data as:
Where status = Complete - Move to Completed Sheet
Where Status = Awaiting Payment OR On hold - Move to Ongoing Sheet
Where Status = Cancelled - Move to Cancelled Sheet
Thanks in advance
Ben