To calculate the sum of the numbers in the current column above the current cell, in Libreoffice Calc: =SUM(INDIRECT(ADDRESS(1,COLUMN())&":"&ADDRESS(ROW()-1,COLUMN()))) (The current cell being the one with this formula in it.) This probably works in Microsoft Excel too, but I haven't used it there.