Sum within a column, according to another column

A

Auditor

I have two columns. One column contains the prices of each item sold. The
other column is called a line number and begins with one for new
transactions. So if a customer bought 4 items, it will go up to 4. Is there
any way to sum just those in a transaction, and then do it for hundreds of
other transactions?
 
S

Shane Devenshire

I second Mike comment.

If your data looks like this in the transaction column:

1
2
1
2
3
4

Then if you want to sum the first 1 and 2 then the second 1, 2, 3, 4 and so
on. It would be much better if you had a customer column so you could easily
destinguish which items below to which customer. If not then here is a
formula to put in column C and copy down. I'm assuming the first row is
titles so your first data is in A2:B2 and this formula goes into C2:

=IF(A2<A3,"",SUM(OFFSET(B2,0,0,-A2)))

Copy this formula down as far as needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top