Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Copy & Paste Range from all Worksheets in all Workbooks in a folde

Thank you sooo-- much!! Your code works great!!! My quality of life is
dramatically improved.

In answer to your question, yes, the summary sheet is always the first
sheet in the workbook.

Thanks again! I really appreciate it.

:-)

Amy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Copy & Paste Range from all Worksheets in all Workbooks in a folde

Try this

If LCase(sh.Name) = "summary" Then
str = Mid(mybook.Sheets(2).Name, 8, 9)

You can also use Mid for the other part instead of Right en Len

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


wrote in message ups.com...
Thank you sooo-- much!! Your code works great!!! My quality of life is
dramatically improved.

In answer to your question, yes, the summary sheet is always the first
sheet in the workbook.

Thanks again! I really appreciate it.

:-)

Amy

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Copy & Paste Range from all Worksheets in all Workbooks in a folde

Ron,

It worked like a charm! Thank you so- much!! That was a huge piece of
the puzzle!!

Thanks to you, I've now started to work on the next piece: automating
an advanced filter to pull data from one of the worksheets in the
master workbook and place it in each worksheet according to the task
name (as it appears in the tab for each worksheet).

So far, I'm not able to get the same results I have achieved for a
single case scenario. I thought it might work to simply change the
variable name to match yours and add in a "For Each" statement:
For Each sh In basebook.Worksheets
Sheets(str).Select
Range("A1").Select
Sheets("invoice_tracking").Range("a1:h500").Advanc edFilter
Action:= _
xlFilterCopy, CriteriaRange:=Sheets(str).Range("A17:A18"), _
CopyToRange:=Range("B20"), Unique:=False
Next sh

but it didn't. I will keep trying and post back if I'm able to figure
it out.

Any ideas would, of course, be greatly appreciated but regardless,
thanks again for solving the original problem I posted.

Best,
Amy



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Copy & Paste Range from all Worksheets in all Workbooks in a folde

See
http://www.rondebruin.nl/copy5.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


wrote in message oups.com...
Ron,

It worked like a charm! Thank you so- much!! That was a huge piece of
the puzzle!!

Thanks to you, I've now started to work on the next piece: automating
an advanced filter to pull data from one of the worksheets in the
master workbook and place it in each worksheet according to the task
name (as it appears in the tab for each worksheet).

So far, I'm not able to get the same results I have achieved for a
single case scenario. I thought it might work to simply change the
variable name to match yours and add in a "For Each" statement:
For Each sh In basebook.Worksheets
Sheets(str).Select
Range("A1").Select
Sheets("invoice_tracking").Range("a1:h500").Advanc edFilter
Action:= _
xlFilterCopy, CriteriaRange:=Sheets(str).Range("A17:A18"), _
CopyToRange:=Range("B20"), Unique:=False
Next sh

but it didn't. I will keep trying and post back if I'm able to figure
it out.

Any ideas would, of course, be greatly appreciated but regardless,
thanks again for solving the original problem I posted.

Best,
Amy



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
Copy same range of data from all workbooks and paste into consolid Ron de Bruin Excel Programming 3 April 16th 05 12:34 AM
Copy same range of data from all workbooks and paste into consolid Macgru Excel Programming 0 April 12th 05 10:59 PM
cannot copy and paste worksheets or workbooks Tim Excel Discussion (Misc queries) 1 March 29th 05 07:17 PM
Copy/paste range variable between workbooks Jim73 Excel Programming 2 January 14th 05 08:17 AM
Copy several range from all files in folder into several worksheets Adri[_2_] Excel Programming 13 June 27th 04 03:52 PM


All times are GMT +1. The time now is 05:53 PM.

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

About Us

"It's about Microsoft Excel"