Why don't you first solve the problems in your sheet?
Aeff is undefined...Define it! Ncr is also undefined... Define it.
Lambda1 is defined with an illegal range. The second value of the range definition must be different from the first. Try setting it from 0 to 0.1
That's for the obvious errors, those flagged by Prime already.
Then there's the problem with phi. You have a function phi (of alpha, lambda0 and lambda1) and you have a variable phi, inside the definition of function chi (again of alpha, lambda0 and lambda1). Those two phi's are not the same. If you want to use the phi defined as function within chi, you HAVE to provide its parameters.
And finally you will have to check your units. Since f0 has a unit (MPa), lambda1 will probably have a unit, depending on the units of Aeff and Ncr. You must make sure that lambda0 has the same unit as lambda1. And from the definition of the function phi, alpha needs that same unit, as does 1.... lambda1 should better be unitless, so Aeff and Ncr need to cancel the unit of f0 out, that is: Ncr/Aeff must have a pressure unit.
But essentially, all you need is this:
Note that I used the min() function to limit chi to 1.
Guess you could not open Luc's file?
As far as I am aware you are using Prime Express 4, so why don't you upgrade to version 5?
Here is a picture of the routine Luc had provided:
I posted routines for linear and logarithmic grids here
but Luc's recursive approach using the if-function has the advantage that it works in the limited Expression version, too.
It was a Prime 4 worksheet. I seldomly post a Prime 5 worksheet.
So my copy and paste action wasn't necessary at all.
On first sight we unfortunately can't distinguish between files from different Prime versions.
Here's a Prime 4 file with a Grid function that will do linear and log scale grids.
(The function definition is in the collapsed area.)