Hi All,
I have a piece of code which I have put below, I need to try and somehow alter it slightly.
The code below sorts the data by seeing whether a cell color in Column A is 255, 0, 0 and then it will copy and paste it onto sheet "ToDo" and then delete it on the original spreadsheet... however I want to change it where if there is;
I have a piece of code which I have put below, I need to try and somehow alter it slightly.
The code below sorts the data by seeing whether a cell color in Column A is 255, 0, 0 and then it will copy and paste it onto sheet "ToDo" and then delete it on the original spreadsheet... however I want to change it where if there is;
2 Duplicates = Gets copied onto spreadsheet "ToDo_2"
3 Duplicates = Gets copied onto spreadsheet "ToDo_3"
4 Duplicates = Gets copied onto spreadsheet "ToDo_4"
I hope this makes sense and thanks in advance
VBA Code:
Sub Sort_Data()
With Sheets("Sort")
If .AutoFilterMode Then .AutoFilterMode = False
With .Range("A1:O50" & .Range("A" & Rows.Count).End(xlUp).Row)
.AutoFilter 1, RGB(255, 0, 0), xlFilterCellColor
.Offset(1).Copy Sheets("ToDo").Range("A" & Rows.Count).End(xlUp)(2)
.Offset(1).Delete
Sheets("Sort").ShowAllData
End With
Range("A2").Select
End Sub