IF Function

  • Thread starter Thread starter Andrew C
  • Start date Start date
A

Andrew C

Hi

I am wondering if you can put the folllowing code into the control source of
a field.

=if([average score]-[tournament avg]<0,0,[average score]-[tournament avg])

What i am wanting i if the Persons average is lower than the tournament
average they get 0 points. If their average is higher than the get the
difference between the two figures.

If this is not possible with the code i have can someone please explain to
me what has to be done.

Thanks for your help

Andrew C
 
Ciao said:
Hi

I am wondering if you can put the folllowing code into the control
source of a field.

Is "iif"

=iif([average score]-[tournament avg]<0,0,[average score]-[tournament avg])
 
Ciao said:
I am wondering if you can put the folllowing code into the control
source of a field.

Is "iif"

=iif([average score]-[tournament avg]<0,0,[average score]-[tournament avg])
What i am wanting i if the Persons average is lower than the
tournament average they get 0 points. If their average is higher
than the get the difference between the two figures.
If this is not possible with the code i have can someone please
explain to me what has to be done.
Thanks for your help


That sounds about right.
Is it not working?
 
Ciao said:
Ciao said:
I am wondering if you can put the folllowing code into the control
source of a field.

Is "iif"

=iif([average score]-[tournament avg]<0,0,[average
score]-[tournament avg])
What i am wanting i if the Persons average is lower than the
tournament average they get 0 points. If their average is higher
than the get the difference between the two figures.
If this is not possible with the code i have can someone please
explain to me what has to be done.
Thanks for your help


That sounds about right.
Is it not working?



It changes the commas (,) with the semicolons (;)
 
It changes the commas (,) with the semicolons (;)

--
Ciao
Geppo- Hide quoted text -

- Show quoted text -

It changes the commas w/ semicolons? Do you mean after you try to
exit out of the expression builder?

Try to play around w/ quotes...
Maybe something like

=IIF("[average score]-[tournament avg]"<"0",0,"[average score]-
[tournament avg]")
 
Ciao said:
Ciao Andrew C wrote:
Hi
I am wondering if you can put the folllowing code into the control
source of a field.
Is "iif"
=iif([average score]-[tournament avg]<0,0,[average
score]-[tournament avg])
What i am wanting i if the Persons average is lower than the
tournament average they get 0 points. If their average is higher
than the get the difference between the two figures.
If this is not possible with the code i have can someone please
explain to me what has to be done.
Thanks for your help
Andrew C
That sounds about right.
Is it not working?

It changes the commas (,) with the semicolons (;)


It changes the commas to semicolons? Is that after you try to exit
the expression builder?

Try to play around w/ quotes...
=iif("[average score]-[tournament avg]"<"0",0,"[average score]-
[tournament avg]")
 
Ciao said:
Ciao said:
Ciao Andrew C wrote:
Hi
I am wondering if you can put the folllowing code into the control
source of a field.
=iif([average score]-[tournament avg]<0,0,[average
score]-[tournament avg])
What i am wanting i if the Persons average is lower than the
tournament average they get 0 points. If their average is higher
than the get the difference between the two figures.
If this is not possible with the code i have can someone please
explain to me what has to be done.
Thanks for your help
Andrew C
That sounds about right.
Is it not working?

It changes the commas (,) with the semicolons (;)


It changes the commas to semicolons? Is that after you try to exit
the expression builder?

Try to play around w/ quotes...


=iif([average score]-[tournament avg]<0;0;[average score]- [tournament avg])
 
Hi thanks just change the start (added the extra "i" and is all good thanks
alot

geppo said:
Ciao said:
Hi

I am wondering if you can put the folllowing code into the control
source of a field.

Is "iif"

=iif([average score]-[tournament avg]<0,0,[average score]-[tournament avg])
What i am wanting i if the Persons average is lower than the
tournament average they get 0 points. If their average is higher
than the get the difference between the two figures.

If this is not possible with the code i have can someone please
explain to me what has to be done.

Thanks for your help

Andrew C
 
Back
Top