This is the code that I have so far. I have a couple of issues I think. First I am not sure how to use the "LastRow = Cells.Find("*", serchdirection:=xlPrevious).Row". would the search direction just be up, down, left, right? Also this worksheet that I am copying the the data from is more like a report. My issue with that is I need this code to work on all the files (around 50) and i am worried that if i use:
Dim LastRow As Long
Dim LastRowE As Long
LastRow = Cells.Find("*", serchdirection:=xlPrevious).Row
LastRowE = Range("E:E").Find("*", serchdirection:=xlPrevious).Row
LastRowE = Range("E" & Rows.Count).End(xlUp).Row
It is just going to find the first space. If this is the case it is not going to work because there are spaces all over the place. I cant figure out how to post an image. If you let me know how to do that then I will post an image of the file.
Dim LastRow As Long
Dim LastRowE As Long
Sheets("AL").Select
Cells.Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Workbooks.Open Filename:= _
"C:\Documents and Settings\bschulze\My Documents\D\Projects\F\V_Reports\V_Files\Example_Data.xls"
Cells.Select
Selection.Copy
Windows("Tester.xls").Activate
Sheets("AL").Select
Range("A1").Select
LastRow = Cells.Find("*", serchdirection:=xlPrevious).Row
LastRowE = Range("E:E").Find("*", serchdirection:=xlPrevious).Row
LastRowE = Range("E" & Rows.Count).End(xlUp).Row
ActiveSheet.Paste
Windows("Example_Data.xls").Activate
Application.CutCopyMode = False
ActiveWindow.Close
Windows("Tester.xls").Activate
Cells.Select
Cells.EntireColumn.AutoFit
Application.CutCopyMode = False
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=*sub-total*", Operator:=xlAnd
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter Field:=1, Criteria1:="=*vvvvvvv*", Operator:=xlAnd
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Selection.AutoFilter Field:=1
Selection.AutoFilter
Range("A1").Select
End Sub