View Single Post
Old 2010-08-07, 11:09   Link #4074
Jinto
Asuki-tan Kairin ↓
 
 
Join Date: Feb 2004
Location: Fürth (GER)
Age: 43
Quote:
Originally Posted by Tiberium Wolf View Post
Crap. I am bugged with an excel problem. (using excel 2007)

I have like column P and Q, one with name and other with values from the following formula: = TRUNC((COUNTIF(C5:G2000,"1")/COUNT(A5:A2000))*100,2)

What I am doing is to count the number of times that the number 1 appears in the cells range C5:G2000, etc.

My problem is I wanna sort the P and Q.

Example of P and Q

N01 10.32
N02 8.55
...
N40 9.43


I wanna get the top 5 so I just select the 2 columns and use excel sort. The problem here is that the sort changes the values in the 2 ranges (C5:G2000 and A5:A2000) and I dunno why. I can't figure it out why it changes the formula. I couldn't find any solution in google.
Does it change the formula (I doubt it) or does it change the sorting of the values that the formula uses as input?

edit: Since you are using relative addressing... the sorting will affect the other cells too, messing up your input data set.
Use the calculated row as another input set for another formula that gives you a sorted list of what is in your current result list...
__________________
Folding@Home, Team Animesuki
Jinto is offline   Reply With Quote