Access - insert based on sum by group

Mariyka1

New Member
Joined
Nov 1, 2016
Messages
44
Hi if anyone could help with this I would really really appreciate it. I have a table in access which has 9 columns.

Market / Manager /RM / Company/ Site / ID/ Time Frame / Type / Type Count

I want to be able to insert new rows based on the sum of "Type Count" and the "Time Frame"
there are 3 different time frames (30 days, QTD and YTD)
so based on the sum of the count - if its zero then insert a one for every time frame. I'm trying to get a count for all the companies that havent been contacted within each given time frame.

any insite is very much appreciated!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
I'm trying to get a count for all the companies that havent been contacted within each given time frame.

How do you identify contact with a Company? Seems that is key to any solution, but we need more details to offer more focused response.
 
Upvote 0
Hi, In a general sort of a way you could probably break this problem into two parts: 1) getting the sum of the count and 2) doing the insert. Very likely it's the first that is the most important - work on that one and don't worry about the second yet... Also I would suggest you post some sample data and whatever sql you have tried so far (whether or not its working)...
 
Upvote 0

Forum statistics

Threads
1,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

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