Find Duplicates in one column and sum other column

B

Boss

Hi,

I have a master table with Five columns. I would import multiple files of
excel into one master table in access. The field in master table are
mentioned below. Case ID is not the primary key.

CaseID, Name, empID, activity, time taken

What i need is-

If case ID,Name & Activity is similar in two or more records then I need to
merge all of those records into one record with the sum of time taken.

Idea is if an employee has worked on the same activity & same case twice or
"n" times then i need to grab the total time in the table.

I can so this on excel using concatenate & sumif function, please help me do
this in access. Thanks as always!

Thx!
Boss
 
J

Jeff Boyce

If I'm understanding your description, the sum of all [time taken] values
when [EmpID] and [Activity] are the same gives you what you're after.

That sounds like a Totals query.

Open a new query in design view.

Add the table.

Add the three fields ([EmpID], [Activity], [time taken]).

Click the <Totals> button in the Toolbar.

Leave [EmpID] and [Activity] as "GROUP BY".

Change [time taken] to "SUM".

Run it.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top