Hi!What I am looking for is giving the FieldA a Rank depending on the values in FieldB. I would like to end up with sth. like this. Can i do this easy in the field calculator?Rank orig. Value1 52 73 144 23 in python i did it like this:import arcpy, numpy, osfrom arcpy import env
import arcpy, numpy, os
ShapeName=arcpy.GetParameterAsText(0)
Field=arcpy.GetParameterAsText(1)
RankField=arcpy.GetParameterAsText(2)
rows = arcpy.SearchCursor(ShapeName)
d=[]
for row in rows :
FieldValue=row.getValue(Field)
d.append(FieldValue)
d.sort()
arcpy.AddMessage(d)
del rows
rows2 = arcpy.UpdateCursor(ShapeName,"","",RankField,"")
row2= rows2.next()
while row2:
x=0
for i in d:
y=d
if row2.getValue(Field)==y:
rank2=d.index(y)
rank=rank2+1
row2.setValue(RankField, rank)
rows2.updateRow(row2)
x=x+1
row2 = rows2.next()
del rows2
Thanks for any help