Im trying to make an Excel file from an Access query. I need to calculate the amount for each column in the resulting table and add them to the last row as SUM. I transferd a table from queries to Excel sheet, but I can not add the amount. Is it possible to use the VBA inside Access to find the height of a column and add the sum of the column to the next cell?
If you do not want to do any job with functions in excel you could simply do it in the sql query in access and choose to export the query result. Here is an example:
SELECT Table1.[ID], Table1.[Field1], Table1.[Field2] FROM Table1 union all SELECT 'sum', sum(Table1.[Field1]), sum(Table1.[Field2]) FROM Table1;