Combine Rows based on 2 columns

tomexcel1

New Member
Joined
Feb 22, 2018
Messages
47
Hi All

Im quite new to Access and Im trying to figure out if this is even possible.

Basically I have a table in Access with over 1 million rows. I want to be able to combine rows that have the same person ID and the same item name.

This is a basic example of the current data:

Person IDItem NameValue
123Item A22
123Item B10
123Item B30
123Item B100

But want to get it so it combines identical person id and item. and sums the values like this:

Person IDItem NameValue
123Item A22
123Item B140

Is something like this even possible? Any help will be much appreciated.

Thanks
Tom
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
This can be done pretty easily with an Aggregate Query. Just do the following steps:
1. Go into the Query Builder and select th table that holds this data
2. Add the Person ID, Item Name, and Value fields to the fields being returned.
3. Click on the Totals button icon shown in the menus (looks like a Sigma)
4. This will add a "Totals" row to the fields in the bottom of the Query Builder, with the words "Group By" under each one.
Under the "Value" field, change the words "Group By" to "Sum"

Now view your results in Datasheet View. You should now have what you want.
 
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

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