keeping cell references during sort

L

laudus

I have data that I am summing. For example, I have B1 =SUM(A1:A3).
Then B2 = SUM(A4:A6). I need a way that if I sort the data in column
the cell references in Column B update. So if my B1 data is no
contained in A5, A12, A15, my B1 formula will update to B1 =SUM(A5
A12, A15). Is there a way to do this?

Thanks,

Erik Spark
 
D

Debra Dalgleish

The formula in B1 won't change when column A is sorted -- it will
continue to sum A1:A3.

You could add a column to categorize the amounts, then use a SUMIF
formula to sum the appropriate cells. For example

A B C D
1 a 10 =SUMIF($A$1:$A$6,"a",$B$1:$B$6)
2 a 15 =SUMIF($A$1:$A$6,"b",$B$1:$B$6)
3 a 11
4 b 12
5 b 14
6 b 16

I'd leave a blank column (C) so it's easier to sort the list.
 

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