Max, Min & Avg value in form

J

Jon

Greeting,

I have 4 fields (txt1, txt2, txt3 &txt4) numerical and I would like to find
the following result in unbound text box:
-Max value
-Min value
- Average value of 2 fields excluding above Max value and Min value
-Average value of all fields

Any help please?
 
A

Allen Browne

For the first 2 items in your list, see:
MinOfList(), MaxOfList(): Get the min/max of a list of values
at:
http://allenbrowne.com/func-09.html

Once you have the min and max, you can average them by adding and then
dividing by 2.

If you are comfortable writing code, you could write something like
MinOfList() to loop through the items and average them (remembering that
nulls don't get counted in an average.)

As the article points out, it might be better to create a related table
where you can have several records, rather than have repeating values in a
table. It would certainly be easier that way in a relational database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top