sorting formulas with cells

  • Thread starter Thread starter Jill33
  • Start date Start date
J

Jill33

I'm having trouble with what seems like an easy problem. How come when I
sort my data, the forumlas I have in it don't stay relative? For example, I
have

Seattle Washington 14
Olympia Washington 27
Dallas Texas 8
Austin Texas 11

I've got the Washington numbers adding and the Texas numbers adding at the
bottom of my page (C1+C2). But when I sort to alphabetize the city, the
formula is still adding C1+C2, not Seattle + Olympia.

Austin Texas 11
Dallas Texas 8
Olympia Washington 27
Seattle Washington 14

How do I keep the formula linked to the contents, and not the cell location?

Thanks!
 
hi
if you are using a simple formula like =sum(c1+c2) then you will get that.
the above formula evaluated cells not data in the cells.
so you will need to use another type formula'

=SUMIF(B1:B4,"Washington",C1:C4)

or sumif(range to evaluate,criteria, range to sum)

regards
FSt1
 
Are you sorting just one column, but not the entire data range? When you do
sorts in Excel, make sure to select the ENTIRE data range and then sort
according to your specific criteria. If you don't do this, one column will
be sorted, but all other columns will remain as they were before you did the
sort (I am fairly certain that this is not what you want to do). Access will
handle all data ranges automatically, but Excel will not.

Regards,
Ryan---
 
Great--thank you! That worked!


FSt1 said:
hi
if you are using a simple formula like =sum(c1+c2) then you will get that.
the above formula evaluated cells not data in the cells.
so you will need to use another type formula'

=SUMIF(B1:B4,"Washington",C1:C4)

or sumif(range to evaluate,criteria, range to sum)

regards
FSt1
 
Yeah, I was sorting the entire data range. The suggestion posted above
worked for me. It seems like there should be an easier way, but I guess not.
Thanks.
 

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

Back
Top