http://www.thespreadsheetguru.com/blog/2014/6/20/the-vba-guide-to-listobject-excel-tables
I wanted to insert totals in selected columns, my playground looked like this:
Function to see total of selected column:
Function sumColumnCenaNetto() sumColumnCenaNetto = WorksheetFunction.sum _ (Sheets("Sheet1").ListObjects("Table1").ListColumns("CenaNetto").DataBodyRange) End FunctionInsert a total formula under the table.
Sub InsertTotal() With Sheets("Sheet1").ListObjects("Table1") .ListColumns("CenaNetto").TotalsCalculation = 1 .ShowTotals = True End Sub
Brak komentarzy:
Prześlij komentarz