If there "may be gaps" in each table,
Columns("I:N").SpecialCells(xlConstants,xlNumbers).Areas is not the right
thing for you to use at all. You need a radically different way to
determine the limits of each table.
You have not provided sufficient information for us to help you with that.
Upload an example Excel file to a file-sharing website, and post the URL of
the uploaded file here.
The following applies if there are __no__ gaps.
Formula = "=SUM(" & SumAddr & ")"
The problem is: NumRange.Count returns the total number of cells, not just
the number of rows. Perhaps the following puts the SUM formula where you
want it:
Dim r as Long, c as Long
r = NumRange.Rows.Count
c = NumRange.Columns.Count
NumRange.Offset(r,c).Resize(1,1).Formula = "=SUM" & SumAddr & ")"
That puts the SUM formula in the cell just below and to the right of the
table. Adjust c for the column that you actually want.
But you do not need c as I defined it if you want to put the SUM formula in
column I under the last row of numbers. The following would suffice:
Dim r as Long
r = NumRange.Rows.Count
NumRange.Offset(r,0).Resize(1,1).Formula = "=SUM" & SumAddr & ")"