# Variable Row # Sums

1. ## Variable Row # Sums

Apologies if this question has been answered before, I haven't had any luck searching. It seems very basic but it's completely stumping me: how do I add a formula which can sum from the cell above it to a point further above, determined based on an adjacent column. So for example:

 A B 1 Entry 1 5 2 Entry 2 6 3 TOTAL X 4 Entry 3 12 5 TOTAL Y

In the above, X should be 11 and Y should be 12. How can I use the same formula in both to get the correct answers?

Thanks!

2. ## Re: Variable Row # Sums

This in B3, B5 and any 'Total' row will do what you want.
Formula:
`Please Login or Register  to view this content.`

It may not be particularly efficient if your list if VERY long.
I'll have a think on it for a better solution.

B.

3. ## Re: Variable Row # Sums

I don't believe you can use the same formula to get the sum of separate ranges which vary in scope. Even using SumIf() the criteria would have to change in the formula to separate the two ranges of values.

but for a one shot deal,

``Please Login or Register  to view this content.``

4. ## Re: Variable Row # Sums

This in B3, B5 and any 'Total' row will do what you want.
Formula:
`Please Login or Register  to view this content.`

It may not be particularly efficient if your list if VERY long.
I'll have a think on it for a better solution.

B.
This worked like a charm! Table isn't long and never will be, so this should do it. Thanks!!

5. ## Re: Variable Row # Sums

B.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1