Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calculate average with text field included

2 views
Skip to first unread message

Richard S. Ridings

unread,
Sep 29, 1998, 3:00:00 AM9/29/98
to
Steve,
Without seeing any of the fields, it is difficult to give you an exact
answer but here goes.
If you are calculating the average in a field in the form, then you can
use an IF #10="P" then #100=@SUM(#20..#40,100)/4 -> assuming field #100
holds the average, there are three fields between #20 and #40 inclusive
and a pass is 100%.
If you are doing this in the derived columns, then you need to use
similar logic but IF doesn't work. Using the above example of pass=100
and fail=0, then I would right it: ((#10="P")*100+@SUM(#20..#40))/4.
This means that if #10="P" then that equates to 1 and 1*100=100 which is
added to the other sum and divided by the four marks. If #10<>"P" then
it equates to zero and 0*100=0 added to the rest.... I think you should
see where I am going with this. Hope this helps.

Steve Woods wrote:
>
> Help!
>
> I am trying to calculate an average using mostly numbers, however, in
> some fields there is a "P" or "F" for pass fail and the program sees
> them as zeros which makes my average incorrect. Is there anyway I
> can fix this problem?
>
> Please help.
>
> Sincerely,
>
> Lost in Texas

--
Richard S. Ridings
Ridings Administrative Services Inc.
Guelph, Ontario

0 new messages