Adding up specific rows in a Google Sheets table

Hey everyone! I’m trying to figure out how to add up certain rows in my Google Sheets table. I know how to sum the whole column, but I’m stuck on adding up just a few specific rows.

Here’s what my table looks like:

Month Sales
Jan 100
Feb 150
Mar 200
Apr 250

I can easily sum the entire Sales column with =SUM(TableName[Sales]). But how do I add up just the middle two rows or the last three? Is there an easy way to do this without using the query function? I’d love to hear your suggestions!

I’ve encountered this issue before, and there’s a nifty solution using the OFFSET function combined with SUM. Here’s how you can do it:

To sum the middle two rows:
=SUM(OFFSET(TableName[Sales],1,0,2))

For the last three rows:
=SUM(OFFSET(TableName[Sales],1,0,3))

The OFFSET function allows you to select a range starting from a specific point in your table. In this case, we’re starting from the second row of the Sales column (the 1 in the formula), selecting 0 columns over, and then specifying how many rows we want (2 or 3 in these examples).

This method is flexible and doesn’t require restructuring your data or using complex queries. You can easily adjust the starting point and number of rows to sum up any specific section of your table. Hope this helps!

Another approach you might find useful is using the INDEX function in combination with SUM. It’s quite versatile for selecting specific ranges within your table. Here’s how you can apply it:

For the middle two rows:
=SUM(INDEX(TableName[Sales],2):INDEX(TableName[Sales],3))

For the last three rows:
=SUM(INDEX(TableName[Sales],2):INDEX(TableName[Sales],4))

This method allows you to precisely define the start and end points of your range. It’s particularly handy when you’re dealing with larger datasets or when you need to frequently change the range you’re summing. The syntax is straightforward once you get the hang of it, and it integrates well with other functions if you need to build more complex formulas later on.