Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combine multiple sheets

Status
Not open for further replies.

maximas

Programmer
Nov 29, 2002
40
US
I have 3 sheets with 4 columns that is the same, but the data on 3 other column might or might not be the same. i need to combine all 3 sheets into 1 sheet. here is the data!
sheet 1 sheet 2
id# | name | month | amt id# | name | month | amt
123 | jay |200601 | 2 111 | will |200602 | 3
222 | bil |200601 | 3 123 | jay |200602 | 2
555 | hill |200601 | 4 222 | bil |200602 | 1

Combine sheet sheets 3
id# | name | month | amt id# | name | month | amt
123 | jay |200601 | 2 111 | will |200603 | 2
123 | jay |200602 | 2 123 | jay |200603 | 1
123 | jay |200603 | 1 555 | phil |200603 | 3
111 | will |200602 | 3
111 | will |200603 | 2
222 | bil |200601 | 3
222 | bil |200602 | 1
555 | hill |200601 | 4
555 | phil |200603 | 3

any suggestions?
 
any sugestions will be greatly appreciated
 



Hi,

Using MS Query to get data from Excel faq68-5829

Use a UNION query like this...
Code:
Select *
From Sheet1
UNION
Select *
From Sheet2
UNION
Select *
From Sheet3


Skip,

[glasses] [red][/red]
[tongue]
 
how would you write that in a vba excel macro?
 
don't anyone have a vba code like loop tru table 1 get data, then compare to table 2, then use the result to compare to table 3 for the final table?
 
What have you tried so far ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
i try using the codes in thread707-501812 but somehow did get it correct. how would you rewrite it for 3 sheets comparing each other and then output it to sheet4. I use the column one as my main comparison for all 3 sheets.
 



You already got a gimme.

Show us the code that you have modified in your try too compare 3 sheets and tell us what it's doing and not doing.

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top