Loop cells - get all rows with matching data - paste into different wb

  • Thread starter Thread starter Buffyslay_co_uk
  • Start date Start date
B

Buffyslay_co_uk

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 (e-mail address removed)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top