Sort

T

tofimoon4

Dear sir,in attached file i have sorted the nos.mentioned in (H) column
to four sheets , i need (1) a code to transfer sorted datas from main
sheet to (A,B,C,D)sheets depending on the nos.of supplying items in (B)
column.(2)button to transfer these data without duplication them in
their sheets.
Thanking you in advance.


+-------------------------------------------------------------------+
|Filename: Sort.zip |
|Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=144|
+-------------------------------------------------------------------+
 
D

Don Guillett

First, DELETE row 4 on the MAIN sheet. Then use this when at the main sheet.
It could be further refined.

Sub filterem()
With Range("b3:g" & Cells(Rows.Count, "b").End(xlUp).Row)
.AutoFilter Field:=6, Criteria1:=">=150", Operator:=xlAnd, _
Criteria2:="<=500"
.Offset(1).Copy Sheets("a").Range("b5")
.AutoFilter Field:=6, Criteria1:=">=50", Operator:=xlAnd, _
Criteria2:="<=149"
.Offset(1).Copy Sheets("b").Range("b5")
.AutoFilter Field:=6, Criteria1:=">=1", Operator:=xlAnd, _
Criteria2:="<=49"
.Offset(1).Copy Sheets("c").Range("b5")
.AutoFilter Field:=6, Criteria1:=0
.Offset(1).Copy Sheets("d").Range("b5")
.AutoFilter
End With
End Sub
 
Top