Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Loop cells - get all rows with matching data - paste into different wb

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Loop cells - get all rows with matching data - paste into different wb

Or use advanced filter to copy the data with one command.

--
Regards,
Tom Ogilvy

"Mike Fogleman" wrote in message
news:CS6Mc.150374$JR4.27865@attbi_s54...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find Matching Data Within Numerous Rows SMH Excel Worksheet Functions 9 October 16th 08 07:19 PM
count number of rows with 2 matching text cells smcmoran Excel Worksheet Functions 5 September 29th 08 05:53 PM
Find matching date in another worksheet, copy and paste data Shoney Excel Discussion (Misc queries) 1 November 8th 07 11:45 PM
Can I merge data in 2 sheets matching rows of data by last name? Corb Excel Discussion (Misc queries) 1 March 18th 07 05:32 PM
constructing a copy-paste loop that skips rows hm[_2_] Excel Programming 1 September 22nd 03 07:05 PM


All times are GMT +1. The time now is 07:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"