ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Football score (https://www.excelbanter.com/excel-worksheet-functions/266063-football-score.html)

gundesvan

Football score
 
=if(B4+B5;equal and greater0;2;0)

It's a football diagram
So if the score is equal then show 2 point.
But the problem is that when i havent inserted any score yet 0 and 0 is also equal and it prints 2 point.. So it got to be equal and larger than 1 then print 2 or else 0

Any tips on how to fix?

wickedchew

Quote:

Originally Posted by gundesvan (Post 959682)
=if(B4+B5;equal and greater0;2;0)

It's a football diagram
So if the score is equal then show 2 point.
But the problem is that when i havent inserted any score yet 0 and 0 is also equal and it prints 2 point.. So it got to be equal and larger than 1 then print 2 or else 0

Any tips on how to fix?

=IF(B4=B5,2,0)

That is if I understood your question.

gundesvan

Quote:

Originally Posted by wickedchew (Post 959683)
=IF(B4=B5,2,0)

That is if I understood your question.

The problem is when i havent filled in the result yet, so when its empty its also the same and it print 2.

It got to be something like =IF(B4=B5and1;2,0)

?

Now i got

=IF(B3C3; "3"; IF(B3<C3; "0"; IF(B3=C3; "2")))

but it need the last if to be bigger than one or else its 0

wickedchew

Quote:

Originally Posted by gundesvan (Post 959685)
The problem is when i havent filled in the result yet, so when its empty its also the same and it print 2.

It got to be something like =IF(B4=B5and1;2,0)

?

=IF(AND(B4=0,B5=0),0,IF(B4=B5,2,0))

gundesvan

Quote:

Originally Posted by wickedchew (Post 959686)
=IF(AND(B4=0,B5=0),0,IF(B4=B5,2,0))

I dont get i to work

=IF(B3C3; "3"; IF(B3<C3; "0";IF(AND(B4=0,C4=0),0,IF(B4=B5,2,0))))

wickedchew

Quote:

Originally Posted by gundesvan (Post 959687)
I dont get i to work

=IF(B3C3; "3"; IF(B3<C3; "0";IF(AND(B4=0,C4=0),0,IF(B4=B5,2,0))))

Could you post a sample of the file you're working on? Even a screenshot would do.

gundesvan

1 Attachment(s)
Quote:

Originally Posted by wickedchew (Post 959688)
Could you post a sample of the file you're working on? Even a screenshot would do.

I want the column E to show "0" when i havent filled in with any results.

Ofcourse i mean 1 point where i have written 2point. (draw)

wickedchew

Quote:

Originally Posted by gundesvan (Post 959689)
I want the column E to show "0" when i havent filled in with any results.

Ofcourse i mean 1 point where i have written 2point. (draw)

=IF(AND(B2=0,C2=0),0,IF(B2C2,3,IF(B2=C2,2,0)))

NOTE: Your file doesn't show and zeros. To show the zeros (Excel 2007):

Excel Options Advanced Display Options for this worksheet Check "Show a zero in cells that have zero value."

gundesvan

1 Attachment(s)
Quote:

Originally Posted by wickedchew (Post 959690)
=IF(AND(B2=0,C2=0),0,IF(B2C2,3,IF(B2=C2,2,0)))

NOTE: Your file doesn't show and zeros. To show the zeros (Excel 2007):

Excel Options Advanced Display Options for this worksheet Check "Show a zero in cells that have zero value."

I got this error

wickedchew

Quote:

Originally Posted by gundesvan (Post 959691)
I got this error

This formula should be in E2:

=IF(AND(B2=0,C2=0),0,IF(B2C2,3,IF(B2=C2,2,0)))

Then drag it downwards.

gundesvan

Quote:

Originally Posted by wickedchew (Post 959692)
This formula should be in E2:

=IF(AND(B2=0,C2=0),0,IF(B2C2,3,IF(B2=C2,2,0)))

Then drag it downwards.

tried that as well..
still got an error..

you couldn't try to fix it you and then upload?

wickedchew

1 Attachment(s)
Quote:

Originally Posted by gundesvan (Post 959693)
tried that as well..
still got an error..

you couldn't try to fix it you and then upload?

Obviously, I've tried all possible combinations for the formula and here's what's happening with your file:

gundesvan

Quote:

Originally Posted by wickedchew (Post 959694)
Obviously, I've tried all possible combinations for the formula and here's what's happening with your file:

Is it any way i refrase the formula?

My need is that when i report the result for the match it has to use the goals to se who wins.

If the + goals is larger than the - goals I got 3 point, if its similar i got 1 point and smaller i got 0.

But, when i havent puttet in any results it thinks the result was even because B2=C2 (0=0) and input 2 points.

wickedchew

1 Attachment(s)
Quote:

Originally Posted by gundesvan (Post 959695)
Is it any way i refrase the formula?

My need is that when i report the result for the match it has to use the goals to se who wins.

If the + goals is larger than the - goals I got 3 point, if its similar i got 1 point and smaller i got 0.

But, when i havent puttet in any results it thinks the result was even because B2=C2 (0=0) and input 2 points.

Let me breakdown the formula and explain it to you:

=IF(AND(B2=0,C2=0),0,IF(B2C2,3,IF(B2=C2,2,0)))

First Part:
IF(AND(B2=0,C2=0),0
If both B2 and C2 are zero, the output is zero

Second Part:
IF(B2C2,3,
If the + Goals is greater than - Goals, the output is 3

Third Part:
IF(B2=C2,2,0)
If both B2 and C2 are equal, the output is 2.

The formula follows a HIERARCHY. So if at this third part both B2 and C2 are zeros, it will be evaluated by the first condition and not by the third condition.

I'm also confused with what you want to happen if both + Goals and - Goals are the same. There are conflicting outputs you want.

Attached is your excel file with the above formula in column E.

Your last post:
"If the + goals is larger than the - goals I got 3 point, if its similar i got 1 point and smaller i got 0. "

Your first post:
"So if the score is equal then show 2 point."

gundesvan

Thanks :)

I wrote wrong in the first post.
When it's a tie (even goals) i want i to print 1 point.
Tried to change the last if to IF(B14=C14;1;0) instead of 2 then it just says
inconsistent formula. why?

wickedchew

Quote:

Originally Posted by gundesvan (Post 959697)
Thanks :)

I wrote wrong in the first post.
When it's a tie (even goals) i want i to print 1 point.
Tried to change the last if to IF(B14=C14;1;0) instead of 2 then it just says
inconsistent formula. why?

Because you only changed a part of the formula for ONE cell. Copy the edited formula to all other cells.

gundesvan

Quote:

Originally Posted by wickedchew (Post 959698)
Because you only changed a part of the formula for ONE cell. Copy the edited formula to all other cells.

Aha! Thank you very much for your help :)


All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com