azizrasul
Well-known Member
- Joined
- Jul 7, 2003
- Messages
- 1,304
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
I wish to place a summation value in a single cell in a spreadsheet (using VBA). Each spreadsheet will have a different number of rows and columns.
However the most right hand column (Total Savings) has a column of numbers which I want to summate and placed at the bottom of this column, like so.
Total Savings
23
43
..
54
324
I have the values of the numbers of rows and columns calculated within MS Access and the summated value.
What code can I use to place intSum in the correct position? Thanks in advance.
However the most right hand column (Total Savings) has a column of numbers which I want to summate and placed at the bottom of this column, like so.
Total Savings
23
43
..
54
324
I have the values of the numbers of rows and columns calculated within MS Access and the summated value.
Code:
intRow = DCount("*", "qryAllTrustsSummarisedReport")
intCol = rstFields.Fields.Count
intSum = DSum("[Total Savings]", "qryAllTrustsSummarisedReport")
What code can I use to place intSum in the correct position? Thanks in advance.