On Jan 27, 2007, at 5:52 PM, Lennox Jacob wrote:

Hello,

I would like to calculate the minimum, maximum and average of a set of editfields values.
I have 11 editfields - Editfield2 to Editfield12

The minimum value goes in an editfield named Min, The maximum value goes in an editfield named Max and the average value goes in an editfield named average.

So I have this code:
Average.Text = Str(Val(Days1.text) + (Val(Days2.text) + Val (Days3.text) + Val(Days4.text)+ Val(Days5.text) + Val(Days6.text)+ Val(Days7.text)+ Val(Days8.text)+ Val(Days9.text)+ Val(Days10.text) + Val(Days11.text))/11) Results.Text = "The minimum is “ + Min.text + “ days and the maximum is “ + Max.text + “ days, with an average of " + average.text + " days."

I can calculate average but I will need some help for minimum and maximum. I would like the app to find the minimum and maximum values that were inserted into the Editfield2 to Editfield12


the min is

min(min(min(min(min(min(min(min(min(min(Val(Days1.text), (Val (Days2.text)), Val(Days3.text)), Val(Days4.text)), Val (Days5.text)), Val(Days6.text)), Val(Days7.text)), Val(Days8.text)), Val(Days9.text)), Val(Days10.text)), Val(Days11.text)))

max is similar_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to