View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
STEVE BELL STEVE BELL is offline
external usenet poster
 
Posts: 692
Default How do I FILTER this?

An easy way (to me) would be to copy the name column to a dummy column
Than use Data Text to Columns to separate the last name from the initials.
Loop through this new name column and build a data transfer macro.
If all the pages in WB1 have sheets with the last name of person, than if
WB2.Cell(tested) = Nm
WB1.Sheets(Nm) represents the worksheet to transfer to

than it is just a matter of identifying which row & column to put the info
in

For x = 1 to lastrow(WB2)
WB1.Sheets(CellText).Cells(rw,col) =
WB2.Sheets("DataSheet").Cells(x,col1)
next

cycle through all the columns in WB2 or change Cells(x,col1) to
Range(cells(x,1),cells(x,5)

--
steveB

Remove "AYN" from email to respond
"Sethaholic" wrote
in message ...

Hi,

I am working with 2 workbooks.

The first workbook has a list of worksheets in alphabetical order by
last name, for example:
"Anderson", "Casey", "Lee", etc.

The second workbook has a sheet with a list of names as well as their
account numbers, descriptions and end dates. However, each person has
several account numbers, and the names in this workbook includes the
Last Name as well as the First Initial. For example, "Anderson M",
"Lee, F", etc.

How can I get vba to sort it so that I can filter out the names and
copy the necessary rows to their respective sheets in workbook1?
Desperately in need of help. Thanks in advance!


--
Sethaholic
------------------------------------------------------------------------
Sethaholic's Profile:
http://www.excelforum.com/member.php...o&userid=25113
View this thread: http://www.excelforum.com/showthread...hreadid=386538