printmedia
asked on
SUM using Excel 2007 VBA
Hi all.
I have a spreadsheet with 3 columns: Invoice, Date and Amount (columns A, B and C).
I would like to use the SUM function using code but I don't know how to do it. Also, the number of rows will vary everytime. Sometimes there will be 3 rows, other times there may be 20 rows.
The data begins in row 5. So, I would need to sum all the numbers starting with cell C5, but again, I don't know how many rows there will be.
The result should be in the row right after the last row having data. So if there are 5 rows, then the SUM would be in in (row 6 ) or C6.
Thank you in advance!
I have a spreadsheet with 3 columns: Invoice, Date and Amount (columns A, B and C).
I would like to use the SUM function using code but I don't know how to do it. Also, the number of rows will vary everytime. Sometimes there will be 3 rows, other times there may be 20 rows.
The data begins in row 5. So, I would need to sum all the numbers starting with cell C5, but again, I don't know how many rows there will be.
The result should be in the row right after the last row having data. So if there are 5 rows, then the SUM would be in in (row 6 ) or C6.
Thank you in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER