### Title

Let Statement Limit

### Post

A member of this forum helped me with the following:

Let ( [ PrevRank = GetNthRecord ( Rank ; If ( Get ( RecordNumber ) = 1 ; 0 ; Get ( RecordNumber ) - 1 ) ) ; PrevScore = GetNthRecord ( Total Points; If ( Get ( RecordNumber ) = 1 ; 0 ; Get ( RecordNumber ) - 1 ) ) ] ; If ( PrevScore ≠ Total Points ; Get ( RecordNumber ) ; PrevRank ) )

This calculates the rank of tennis players.

However, the let statement quits at the rank of 121 with the remaining records showing a ?

Is there a limit? It works amazingly well for the players with a rank of 121 or less.

Thanks for your help.

Tracy

I do not know about a limit with the Let function. It rather might be a problem with the the GetNthRecord function.

But besides the question about any limits, you could solve the problem in a different way.

What is this calculation doing? First, it gets the entries of the value list, then it calculates the position of the current total points within this list. With the function PatternCount it calculates the line number (index) of the position in the list. This value is substracted from the number of values in this list.

There are different ways how you can calculate the last step, but basically this should give you the number you are looking for.

~Arnold Kegebein