Count column in Query

mattpfc

Active Member
Joined
Nov 21, 2002
Messages
299
Hi all,

Could somebody tell me if it is possible to created a column within a query that totals all numeric values within a certain column. I do not need to count the amount of rows I need to count the total of the column. e.g.column A has 10 rows and each row has the value of 2 then the total is 20.

Thanks in advance
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
matt,

Right of the top, I'd say "No." But, look at creating a report based on your query. That will be able to do what you want (if I understand correctly what you want). Keep in mind that Access is a database application and as such it can only do limited math. A report, or taking the data to Excel, should be the way to go. If you haven't any experience with Reports, try it. Its a good skill to have.


enjoy
 
Upvote 0
I think you are saying you just need to sum a column. If so all you need to do is click the Totals button up on your toolbar while in query design view. It looks like an E. This will add a new option to your fields at the bottom of the window called Total. These should all default to Group By. Just go to the field you want to sum and change the Total option from Group By to Sum. The sum/sums you get will be based on the other fields you add to the query. For example, assume you have three fields called City, Hotel and Customers. If City and Hotel are marked as Group By while Customers is marked as Sum, you will get a resultset that sums up the number of Customers for each hotel while also listing the city for each Hotel. If you remove the Hotel field and run the query you will get a resultset that sums up the number of Customers for each City. I hope this helps.

Robert Hall
This message was edited by belzar on 2002-12-09 13:38
This message was edited by belzar on 2002-12-09 13:39
 
Upvote 0

Forum statistics

Threads
1,221,490
Messages
6,160,133
Members
451,622
Latest member
xmrwnx89

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