Recently, Tom Vawter wrote:
> Is there an average function that will not consider blank fields? For
> instance, if I have 10 and 8 in two fields and an empty third field, I
> want to take the average of the numbers in the three fields and get 9
> rather than 6.
Could you do this?
function nonemtpyAverage
put 0 into N
put 0 into tTotal
repeat with F = 1 to number of flds
add fld F to tTotal
if fld F <> "" then add 1 to N
end repeat
return tTotal/N
end nonemtpyAverage
You may need to limit the number of fields you want to check.
Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution