View Single Post
  #3   Report Post  
mully
 
Posts: n/a
Default

Hi Bonzo 123

Thanks for your help will try later today to implement what you have
suggested and with a fair wind I will get back to you - hopefully with
everything working OK.

Cheers ----- Mully

"Bonzo123" wrote:


I hope that I understood your issue correctly.

I my example below the sheets are called Open, North, West and South.
The numbers 1 to 50 are the A2 to A51 in the "Open" sheet. The output
in the West, North and South sheets will appear in B2 to B21

Regards

Brian

Sub filter()

Dim i As Integer
Dim w As Integer
Dim n As Integer
Dim s As Integer

i = 1
w = 1
n = 1
s = 1

For i = 1 To 50

NSW = Worksheets("Open").Cells(1 + i, 2)
Num = Worksheets("Open").Cells(1 + i, 1)

If NSW = "West" Then
Worksheets("West").Cells(1 + w, 2) = Num
w = w + 1
End If

If NSW = "North" Then
Worksheets("north").Cells(1 + n, 2) = Num
n = n + 1
End If

If NSW = "South" Then
Worksheets("south").Cells(1 + s, 2) = Num
s = s + 1
End If


Next i

End Sub


--
Bonzo123
------------------------------------------------------------------------
Bonzo123's Profile: http://www.excelforum.com/member.php...o&userid=24182
View this thread: http://www.excelforum.com/showthread...hreadid=382313