View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default help with listing data

Hi

I would use an autofilter and filter for client ID#, then copy visible
rows, like this:

Sub FilterCopy()
Dim FilterRange As Range
Dim CopyRange As Range
Set FilterRange = Range("A1:A100") 'Header in row
Set CopyRange = Range("A2:A100")
FilterRange.AutoFilter Field:=1, Criteria1:=123456
CopyRange.SpecialCells(xlCellTypeVisible).Copy _
Destination:=Worksheets("Sheet2").Range("A2")
Application.CutCopyMode=False
End Sub

Regards,
Per


On 6 Feb., 05:25, Bradly wrote:
I am using a COUNTIF function to count the number of times a client ID# is
found in our master list of cases. *This signifies that the particular client
has that certain number of cases with us. *The ID# and case information would
be found spread out in the list, as opposed to being grouped together. *Is
there any way to actually find these instances, copy each one, and paste each
in a separate worksheet?

For example, the COUNTIF function shows that client ID# 123456 occurs 4
times, meaning this client has 4 cases. *One case might be on row 13, the
second on row 274, etc. *Is there any way to set up a function, formula, or
macro to read the entire list, pick out each of these 4 cases by client ID#,
and paste them together in a separate worksheet?

Thanks.