View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Loop cells - get all rows with matching data - paste into different wb

Instead of looping through your data in column E, use AutoFilter on all the
data with the filter field as column E and the criteria as "XXXX". Then
copy/paste the filtered data to your other workbook. The looping will be
done on the filter criteria to do the above routine again with "YYYY".
Without more specifics, I can't give you code, but the Macro recorder would
give you the filtering routine code to build your loop around.
Mike F
"Buffyslay_co_uk" wrote in message
om...
ok - i think i got most of what i am looking for in the title!!

I have a workbook, i have data in rows - (cols A:CJ)

Loop cells (col E)-

get all rows with matching data in where the first 4 characters =

("XXXX") -

paste all of these into different wb, worksheet ( "FAR" )

then again for ("YYYY") etc....

can anyone show me some quick code that i can throw in???

note: the workbook is already open, and is referenced in the code

already....

(reply to