This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Here's the code for the current Macro:
Sub CleanUp()
'
' CleanUp Macro
' Delete Unwanted Columns and Clean Up Data
'
' Keyboard Shortcut: Ctrl Shift M
'
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
Selection.Delete Shift:=xlToLeft
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Selection.Delete Shift:=xlToLeft
Columns("K:K").Select
Selection.Delete Shift:=xlToLeft
Columns("L:L").Select
Selection.Delete Shift:=xlToLeft
Selection.Delete Shift:=xlToLeft
ActiveWindow.SmallScroll Down:=-2
End Sub
In addition to the above, I want it to do the following:
Delete any rows where the value in column G is before June 1, 2016.
Delete any row where the number in columns C, D or E is any value other than 1 - 5.
Column A is supposed to be a unique identifier for every row. However, for some reason, it is possible there are duplicates. In cases where there are duplicates, I want the macro to delete all but the last one. The data is organized chronologically by time (which is in column H).
Post Details
- Posted
- 8 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/excel/comme...