Row issue

Closed
ahmed - Sep 7, 2009 at 03:12 PM
 ahmed - Sep 8, 2009 at 04:03 AM
Hello,
plese check the codes s i ma getting some error in row range
Sub sagstep6()
'
' sag Macro
' Macro recorded 8/18/2009 by ahmed.rashid1
'

'
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=10, Criteria1:="1"
Range("J3").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("3:3128").Select
Range("J3").Activate
Selection.Delete Shift:=xlUp
Range("A1").Select
Selection.AutoFilter
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=8, Criteria1:="CRB CANCELLED."
Range("H5").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("5:2486").Select
Range("H5").Activate
Selection.Interior.ColorIndex = 54
Range("A1").Select
Selection.AutoFilter
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=8, Criteria1:="INVALID/INCOMPLETE, HOLD."
Selection.AutoFilter Field:=9, Criteria1:="Match"
Range("I558").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("558:2696").Select
Range("I558").Activate
With Selection.Interior
.ColorIndex = 38
.Pattern = xlSolid
End With
Selection.Copy
Sheets("Final Outstanding QF").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Reconciliation").Select
Range("A1").Select
Application.CutCopyMode = False
Selection.AutoFilter
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=8, Criteria1:="INVALID/INCOMPLETE."
Selection.AutoFilter Field:=9, Criteria1:="Match"
Range("I2").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("2:3016").Select
Range("I2").Activate
Selection.Copy
With Selection.Interior
.ColorIndex = 38
.Pattern = xlSolid
End With
Selection.Copy
Sheets("Final Outstanding QF").Select
Range("H1").Select
Selection.End(xlDown).Select
Range("A12").Select
ActiveSheet.Paste
Sheets("Reconciliation").Select
Range("A1").Select
Application.CutCopyMode = False
Selection.AutoFilter
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=8, Criteria1:="VALID, HOLD."
Range("H2679").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("2679:2690").Select
Range("H2679").Activate
Selection.Copy
Sheets("Valid Orders").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Reconciliation").Select
Application.CutCopyMode = False
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("A1").Select
Selection.AutoFilter
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=8, Criteria1:="VALID."
Range("H869").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("869:2983").Select
Range("H869").Activate
Selection.Copy
Sheets("Valid Orders").Select
Range("H1").Select
Selection.End(xlDown).Select
Range("A4").Select
ActiveSheet.Paste
Sheets("Reconciliation").Select
Application.CutCopyMode = False
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("A1").Select
Selection.AutoFilter
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=8, Criteria1:="="
Range("D3").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("3:3030").Select
Range("D3").Activate
Selection.Copy
Sheets("Completed QF").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Reconciliation").Select
Application.CutCopyMode = False
Selection.ClearContents
Selection.Delete Shift:=xlUp
Range("A1").Select
Selection.AutoFilter
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=9, Criteria1:="="
Selection.AutoFilter Field:=8, Criteria1:="<>CRB CANCELLED.", Operator:= _
xlAnd
Range("H48").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("48:59").Select
Range("H48").Activate
Selection.Copy
Sheets("Revalidate").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Reconciliation").Select
Range("A1").Select
Application.CutCopyMode = False
Selection.AutoFilter
ActiveWorkbook.Save
End Sub
Related:

1 response

sarbel.vilo Posts 233 Registration date Tuesday November 18, 2008 Status Member Last seen August 1, 2010 31
Sep 7, 2009 at 05:03 PM
Whats exactly your problem ? What are you trying to do ?
1
hi
i have created a macro in which there is a limitation of row selection this macro works only on the same file if my data get changed then its debugg or make mess
i want the rows range should be as it can be used for all files
as u have seen my codes can u please help me

thanks
ahmed
0
in this macro i have used autofilter and taken the data and cut and pasted in diffrent sheet but this macro takes only limited rangd
for example i have 3000 rows which are selected in this macro
but in othere file there 4000 rows it only selects 3000 rows i am unable to find the codes for it
please help

ahmed
0