Combining Queries from tables?

smaigs

New Member
Joined
Apr 12, 2003
Messages
28
I have created a database which is for materials used on a contract. I have a table incorporating material codes. I have had to create multiple tables for each type of work to enable various calculations to be made ie sum of materials used on each type of work.

The problem then occurs when I try to combine these multiple queries(calculations) to result in one table of material codes for a scheme. The result seems to combine all materials of each code and totals each one for each type of work. Instead of a total of 4 for 4 types of work i might get a total of 12, 17, or 24 etc. The total query seems to add each item from each type of work numerous times.

Hope this is clear and I hope someone can help

Thanking you in anticipation

Smaigs
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
It sounds as if you have not joined the tables correctly and are getting a Cartesian product. One thing that can cause this is if you have multiple field indexes but have only joined one of the fields in the query.

From the description you give of your queries, you probably want to join them back into one using a Union Query.

HTH

Peter
 
Upvote 0

Forum statistics

Threads
1,221,631
Messages
6,160,942
Members
451,679
Latest member
BlueH1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top