how do i tell access to add up the totals for people with the same name?

ilkvarr

New Member
Joined
Sep 7, 2015
Messages
2
i have a table in access, that basically has fields
first name: lastname: cost: (is a few more things but not relevant)

each record, is the cost of a service. i want to be able to add up the total cost for each person, in either another table, or a query. does anyone know how to do this?

for example if there was

jo blogs £12
fred boon £10
jo blogs £5

i'd want a table with
jo blogs £17
fred boon £10


but i'd also want the orginal table.
if anyone can help me with this, would be most grateful :)

edit: oh, and if its helpful, i have a separate table with a list of all our customers.
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Welcome to the Board!

Add a Select query with Name/Cost of Service, then select Totals and Group By on Name and Sum on Cost.

HTH
 
Upvote 0
You would use a Totals (Aggregate Query) to do this.

Just add the three fields, firstname, lastname, and cost to your query.
Then click on the Totals icon in the toolbar of the Query Designer (looks like a Sigma).
This will add a "Totals" row under each field in the Query Designer.
Leave the firstname and lastname Totals fields set to "Group By", as these are the fields you want to Group on.
Then change the Totals field for cost to "SUM".
View the results.

This will SUM up each distinct grouping it finds.
 
Upvote 0

Forum statistics

Threads
1,221,845
Messages
6,162,350
Members
451,760
Latest member
samue Thon Ajaladin

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