# =SUM(J23/(G23-H23)) for a whole column?

Can I perform this SUM for a whole column without entering in each line number manually? Is there a simpler way to do it if not?

Clarification:

I would like to have a fourth column that has the value of the formula for each line (e.g. K23 would be the result of the above formula).

edit retag close merge delete

Sort by » oldest newest most voted If you want to sum a whole column, e.g. column A, enter =SUM(A:A). If you want to divide the sum of column J by column G subtracted by column H, enter =SUM(J:J)/(SUM(G:G)-SUM(H:H)).

more Depending on what is meant by "for a whole column", @hjek's answer may apply; or, as I suspect (based by your "I would like to have a fourth column that has the value of the formula for each line"), you could mean simply how to copy the formula to all cells in a column.

Then, you can enter the formula to, say, K23 (as you show); then copy the cell (not the text in cell!) - single-click to another cell first, then single-click back to K23, making sure that you are not editing the formula, then Ctrl+C; then select all the cells in the column (or - preferrable - a subrange adjacent to your data) - by clicking with mouse on the column's header, or by putting cursor to last cell and using Shift+Ctrl+↑, or by entering the range (K:K or K1:K123) into Calc's Name Box at top left corner of the sheet; then paste: Ctrl+V.

By the way: the formula =SUM(J23/(G23-H23)) is equal to this simplified formula: =J23/(G23-H23).

more