Forum Discussion
emelie745
Jan 22, 2024Copper Contributor
Summating multiple columns to a new column
Hi! I'm an Excel-beginner and need to know how to add a new column and in this I want 5 other columns to be summated. This feels like it should be simple but I can't make it work. /Emelie
HansVogelaar
Jan 22, 2024MVP
Can you provide more info?
Are your data in an ordinary range, or did you create a table (Insert tab of the ribbon > Table)?
emelie745
Jan 22, 2024Copper Contributor
Okay so i have 6 columns, FD, FE, FF, FG, FH, FI, and the values in each column is either 0 or 1.
I want that the next column; FJ adds the values from the 6 previous columns so that each row of FJ is the sum of the values on the same row (From FD to FI).
For example if on row 2, FD=1, FE=0, FF=0, FG=1, FH=1 and FI=1, I want the corresponding row in column FJ to add these numbers and show the number 4.
Since I have 9000+ rows in my dataset I need this to automatically apply to the following rows, so that each row of FJ sums the current row.
The first row is the name of each column/variable.
I hope this is enough info.
I want that the next column; FJ adds the values from the 6 previous columns so that each row of FJ is the sum of the values on the same row (From FD to FI).
For example if on row 2, FD=1, FE=0, FF=0, FG=1, FH=1 and FI=1, I want the corresponding row in column FJ to add these numbers and show the number 4.
Since I have 9000+ rows in my dataset I need this to automatically apply to the following rows, so that each row of FJ sums the current row.
The first row is the name of each column/variable.
I hope this is enough info.
- HansVogelaarJan 22, 2024MVP
Thanks! The easiest way to do this is to convert the range to a table, for formulas in a table will automatically be applied to all rows of that table, including new ones.
Start by entering a caption in FJ1, for example Sum, or Total.
With FJ1 still selected, activate the Insert tab of the ribbon, and click Table.
Make sure that "My table has headers" is ticked, then click OK.
Select FJ2 and type =SUM(
Then point to FD2 and holding down the mouse button, drag to FI2.
Alternatively, click on FD2, then Shift+click on FI2.
Finally, type ) and press Enter.
The formula should automatically be extended to all cells in column FJ in the table.