Link to home
Start Free TrialLog in
Avatar of SpartanValor
SpartanValor

asked on

VB Script to Loop Through Tabs, Copy, Paste Elsewhere

I need a Macro that will loop through a file and copy a range of data from each sheet into a continuous range on a another sheet or workbook.  The attached filed shows what I need.  Really appreciate your help on this.  Thank you.  

A couple of points:
The row range will change each time I run; can't make an absolute reference. Example: 12/31/09 -> 3/31/10, or 2/28/10 -> 03/31/2010.  I'm fine with requiring I define the value of the LBound and UBound ahead of time. The column range will not change.  The starting cell off the range is always B13.  The tab name will need to be pasted for every record/row copied and pasted.  

Many thanks!
sample.xls
ASKER CERTIFIED SOLUTION
Avatar of nutsch
nutsch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SpartanValor
SpartanValor

ASKER

Wow, I'm very impressed.  This worked first time, straight out of the box, with an idiot (me) implementing it.  I really can't thank you enough.  I have another workbook, different, for which I need to do the same thing.  Once I collect what I need, I will submit a new question.  I'd love it if you took a look since you banged this one out so perfectly.  Thanks so much nutsch!  Best regards,  SV
Glad to help. Thanks for the kind comment.

If you check the constants at the top of my code, you will find that by just changing them slightly, you can apply that code to different workbooks and get the same results.

If you want to post addtl related questions, refer to this original question and I'll get an automatic notification (even though there are a lot of very competent experts at all hours of day and night in the excel zone).

Thomas