Hi,
I have been working on a set of data in excel for the past few days now. I am using a custom filter to get the data i want and then paste that data into a new worksheet. It was working fine untill today and now i cannot even select a row of cells without the error turning up.
Here is the code i am trying to use;
I can execute the search no problem but once i try to exceute the code in bold above i.e. "Range("A1").Select" i get the "1004" error.
I have tried closing and opening excel but this hasnt worked.
I have been copying and pasting this data a few times so that might be part of the problem. The data i am trying to use is roughly 150 rows in size.
Any help would be greatly appreciated.
Regards,
Crunchie
End Sub
I have been working on a set of data in excel for the past few days now. I am using a custom filter to get the data i want and then paste that data into a new worksheet. It was working fine untill today and now i cannot even select a row of cells without the error turning up.
Here is the code i am trying to use;
Code:
Sub RevisedResults()
Sheets("Test_Formatting").Select
Selection.AutoFilter Field:=4, Criteria1:="<>*car*", Operator:=xlAnd _
, Criteria2:="<>*plane*"
Selection.AutoFilter Field:=5, Criteria1:="no"
[B][U]Range("A1").Select[/U][/B]
Columns("A").ColumnWidth = 20
Range("B1").Select
Columns("B").ColumnWidth = 37
Range("C1").Select
Columns("C").ColumnWidth = 20
Range("D1").Select
Columns("D").ColumnWidth = 125
Range("E1").Select
Columns("E").ColumnWidth = 13
Range("F1").Select
Columns("F").ColumnWidth = 13
Range("G1").Select
Columns("G").ColumnWidth = 13
Range("H1").Select
Columns("H").ColumnWidth = 19
Range("I1").Select
Columns("I").ColumnWidth = 15
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Range("A2:I2").Select
Range("A2:I2").Value = "'======"
Range("A1:I1").Select
Selection.AutoFilter
I can execute the search no problem but once i try to exceute the code in bold above i.e. "Range("A1").Select" i get the "1004" error.
I have tried closing and opening excel but this hasnt worked.
I have been copying and pasting this data a few times so that might be part of the problem. The data i am trying to use is roughly 150 rows in size.
Any help would be greatly appreciated.
Regards,
Crunchie
End Sub