Hi all,
I've been creating a macro which enables me to create a table and add additional rows/columns on the click of command buttons. The table is used to track the hours and cost of labour on different jobs.
The code is nearly functional, but I'm having trouble with the formula in a few cells. I'm using a SUMIF formula with structured table references, but when I add new columns, I'm not sure how to extend the last reference ([9]) to always be the last column of the table.
e.g. wrong, incomplete range
Picture1.png
e.g. correct, complete range
Picture2.png
(Note: I've posted this in the vba forum as the formula is added via vba, which may be a factor.)[/FORMULA]
Bookmarks