Excel: How do I reference an entire row except for a couple of cells?

I want to be able to sum together the values of an entire row except for the first 2 cells. So something like this:

=sum(A3:A*infinity*)

How do I do this?


Solution 1:

Something similar has been asked before and I'll repeat this answer: just put:

=sum(a3:a1048576)

because that's the max number of cells per column / row in Office 2007 and 2010. (65536 is max for before 2007.) (For columns, the max column name is XFD in 2007 and 2010, and IV before 2007.)

Solution 2:

Add up everything and then take away the ones you don't want to include:

=SUM(A:A)-A1-A2

Edit:

As josmh has pointed out, the formula above will fail with an error if A1 or A2 are non numeric - but the following will work:

=SUM(A:A)-SUM(A1,A2)  

or

=SUM(A:A)-SUM(A1:A2)  

or (for a bit of fun!)

=SUM(A:A,(-1*(SUM(A1))),(-1*SUM((A2))))

These work because the SUM function ignores non-numeric fields

Solution 3:

This already has several fine answers but here's a method I haven't yet seen posted:

=SUM(OFFSET(3:3,0,2,1,COLUMNS(3:3)-2))

The format is SUM(OFFSET(Range, Rows, Cols, [Height], [Width])). We start with the entire range, offset it zero rows down and two columns over, set the height to 1, and set the width to its current width minus two. So long as the width adjustment is the same as the offset, it works perfectly. Here's the same idea to sum a column instead of a row: (Notice that you don't have to use the Width parameter because you want the same width as the original range.)

=SUM(OFFSET(A:A,2,0,ROWS(A:A)-2))

The benefit of these formulas over the currently accepted answer is that they work in any version of excel. It also won't adjust the range if you insert cells in front because it's referencing the entire row / column. You may or may not want that functionality depending on your data setup.

Solution 4:

I thought you could simply do the following: =SUM(A3:A)

Edit: Sorry I misread, this is for a column

For rows, see the approved answer.

Solution 5:

To sum an entire row:

=sum(1:1)

Replace 1 with your starting row number and then use the autofill handle accordingly. If you drag the formula down, it'll change to "=sum(2:2)" and so on..

To sum the entire row, except the first 2 columns:

=sum(1:1)-sum($a1:$b1)

This'll help you cut down on the file size.