You can use the following basic syntax to calculate the sum of values in a range using VBA: Sub SumValues() Range("D2") = WorksheetFunction.Sum(Range("B2:B11")).
To add up a column or row numbers in a table, use the Formula command. Click the table cell where you want your result. Click the Table Tools Layout tab and.