Link to home
Start Free TrialLog in
Avatar of KathrynT
KathrynTFlag for United States of America

asked on

How to consolidate data from mulltiple worksheets into a worksheet of a same workbook.

Hello,

I have a workbbok with multiple worksheets.  I need a way to take all data from these worksheets, and combine them into a single workshhet.  Please help.

Thank you.

Kathryn
Test--Master-FY12-Capital-Equipm.xls
SOLUTION
Avatar of Dave
Dave
Flag of Australia 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
ASKER CERTIFIED SOLUTION
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
SOLUTION
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 KathrynT

ASKER

Thank you,  Dave and Nutsch.

I'm going to try your VBA codes now.  And will update you guys.

Kathryn
I'd missed Nutsch's post

I think a points split is fair here presuming you can get both codes to do what you want

(I did attach a sample output. It presumed your file was closed, and I removed your redundant sheet1 from the saves file prior to running my code)

Cheers

Dave

 Hi Dave and Nutsch,

I'm little lost here..

1/  First,  I think I need to open my file.
2/  Now I need to insert a new sheet.
3   Then I hold down keys  "ALT" and F11 to open VBA environment.  (Here I can't copy and paste your codes over to my sheet on the right hand side.  It is greyed out.)

Dave, I'm so excited to see your sample file you tested for me.  I have no idea how you got it...but this is definitely a great result.  I hope I can do the same over here.  However, I would refer the code a bit shorter.

Regards,

Kathryn
.
SOLUTION
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
>However, I would refer the code a bit shorter.

The shortness doesn't really make a difference, in this case the length is there for robustness and optionalitu. ie shorter code would be more error prone or produce haphazard outcomes

> I have no idea how you got it.

- Place my code in a new workbook ( follow the same instructions Thomas gave above)
- Have your source workbook closed (with first sheet deleted)
- run the code, pick "No" {single file}, then "Ye: {one sheet} then select your workbook via explorer and its done

Cheers

Dave
SOLUTION
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
Glad to have helped Kathryn, thx for the feedback :)

Dave
Your Answer:
Hi Dave and Thomas,

I tried Thomas's code, and it works!!!

You two are real geniuses.  

Dave, I appreciated your help so much.  I'm going to try your code when I have a need to put all worksheets into a different workbook.

I'm ready to accept these solutions.

Many thanks.

Kathryn