Thread: Sort
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Sort

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"tofimoon4" wrote in message
...

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|
+-------------------------------------------------------------------+

--
tofimoon4
------------------------------------------------------------------------
tofimoon4's Profile:
http://www.thecodecage.com/forumz/member.php?userid=138
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=99846