Difficult function

  • Thread starter Teacher in Revetal
  • Start date
T

Teacher in Revetal

Can anyone help me? I need a function that provides the following:
If a1*a2=a3, then show Good, else show Try again. This function is written
in c3, and I can make it work. But if a3 is a blanc, i want to show c3 as a
blank without ruining the function in c3. Is this possible? My students are
making a math-game.
 
N

Niek Otten

=IF(A3="","",IF(A1*A2=A3,"Good","Try again"))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Can anyone help me? I need a function that provides the following:
| If a1*a2=a3, then show Good, else show Try again. This function is written
| in c3, and I can make it work. But if a3 is a blanc, i want to show c3 as a
| blank without ruining the function in c3. Is this possible? My students are
| making a math-game.
 
M

Mike

no different than the other but just to note A3 will never be blank because
it's a formula, it may be zero.

=IF(A1*A2=0,"",IF(A1*A2=A3,"Good","Try Again"))
 
N

Niek Otten

Who says A3 is a formula?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| no different than the other but just to note A3 will never be blank because
| it's a formula, it may be zero.
|
| =IF(A1*A2=0,"",IF(A1*A2=A3,"Good","Try Again"))
|
| "Toppers" wrote:
|
| > in C3:
| >
| > =IF(A3="","",IF(A1*A2=A3,"Good","TryAgain"))
| >
| > Will this do?
| >
| > "Teacher in Revetal" wrote:
| >
| > > Can anyone help me? I need a function that provides the following:
| > > If a1*a2=a3, then show Good, else show Try again. This function is written
| > > in c3, and I can make it work. But if a3 is a blanc, i want to show c3 as a
| > > blank without ruining the function in c3. Is this possible? My students are
| > > making a math-game.
 
M

Martin Fishlock

You may also want to consider rounding especially if you are using decimals
and may want to do a

=IF(A3="","",IF(round(A1*A2,5)=A3,"Good","Try Again"))
 
T

Teacher in Revetal

Thank you very much. It was just what I and my students needed.
Ellen
 
T

Teacher in Revetal

This was exactly what I and my students needed. Than you very much.
Ellen
 
T

Teacher in Revetal

Thank you very much for your help. The students are not going to make a
formula in A3, but we may use this another time.
Ellen
 
T

Teacher in Revetal

Thank you very much. My students may want to make a game using decimals.
Ellen, Norway
 
T

Teacher in Revetal

Dear Martin.
Can you explain to me what round(A1*A2,5)=A3 means? What is the role of
number 5? I also have to remember than in Norwegian we must use semicolon
instead or comma to make the function play.
Ellen, Norway
 
M

Martin Fishlock

The round function rounds the first number to the last number of decimal
places so
round(A1*A2,5) will calculate A1 X A2 and then round it to 5 decimal places.

So if the answer was 7,9999999999 it would round it to 8 and then compare to
the given anwer which was probably 8 rather than 7,9999999999.
 
T

Teacher in Revetal

Thank you.
I have never learned Excel programming. But my students in 9th grade are now
making a math game together with students in 9th grade in an international
school in another town. They cooperate through Internet. Very interesting,
both for my students and me, and they are very creative.
I did a lot of programming in Turbo Pascal 15 years ago, so I know the
logical thinking, but I don't know the spesifics in Excel. I hope you all can
help me further if I need it.
Ellen from Norway
 
Top