IF Function

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
 
G

geppo

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])
 
S

sandog

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?
 
G

geppo

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 (;)
 
S

sandog

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]")
 
S

sandog

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]")
 
G

geppo

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])
 
A

Andrew C

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
 

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