ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF & AND statements (https://www.excelbanter.com/excel-worksheet-functions/92432-if-statements.html)

hip

IF & AND statements
 

I can't quite get it right.

Let me lay it out:

A1--------A2-----A3------A4
Team 1--score--score--team 2
B1--------B2-----B3-------B4
Team 1--score--score--team 2
-------------------------------------c6
-----------------------------------winner

The idea is that you enter the score between 2 teams in A2 & A3 with
the winner being placed in C6. Easy enough.

However this is for soccer and it could go into penalties. That's why
we have Row B in there.

I can't come up with a formula that will say something to the effect
of:

if team 1 wins they go into c6, if team 2 wins they go into c 6, if
it's a tie then refer to row B and do the same thing. :eek:


--
hip
------------------------------------------------------------------------
hip's Profile: http://www.excelforum.com/member.php...o&userid=31954
View this thread: http://www.excelforum.com/showthread...hreadid=549033


Ian P

IF & AND statements
 
Try:

=IF(B1=C1,IF(C2B2,D2,A2),IF(B1C1,A1,D1))

Ian

"hip" wrote:


I can't quite get it right.

Let me lay it out:

A1--------A2-----A3------A4
Team 1--score--score--team 2
B1--------B2-----B3-------B4
Team 1--score--score--team 2
-------------------------------------c6
-----------------------------------winner

The idea is that you enter the score between 2 teams in A2 & A3 with
the winner being placed in C6. Easy enough.

However this is for soccer and it could go into penalties. That's why
we have Row B in there.

I can't come up with a formula that will say something to the effect
of:

if team 1 wins they go into c6, if team 2 wins they go into c 6, if
it's a tie then refer to row B and do the same thing. :eek:


--
hip
------------------------------------------------------------------------
hip's Profile: http://www.excelforum.com/member.php...o&userid=31954
View this thread: http://www.excelforum.com/showthread...hreadid=549033



Bob Phillips

IF & AND statements
 
=IF(A2+B2A3+A3,A1,A4)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"hip" wrote in message
...

I can't quite get it right.

Let me lay it out:

A1--------A2-----A3------A4
Team 1--score--score--team 2
B1--------B2-----B3-------B4
Team 1--score--score--team 2
-------------------------------------c6
-----------------------------------winner

The idea is that you enter the score between 2 teams in A2 & A3 with
the winner being placed in C6. Easy enough.

However this is for soccer and it could go into penalties. That's why
we have Row B in there.

I can't come up with a formula that will say something to the effect
of:

if team 1 wins they go into c6, if team 2 wins they go into c 6, if
it's a tie then refer to row B and do the same thing. :eek:


--
hip
------------------------------------------------------------------------
hip's Profile:

http://www.excelforum.com/member.php...o&userid=31954
View this thread: http://www.excelforum.com/showthread...hreadid=549033




Ian P

IF & AND statements
 
Much more elegant Bob! (even with the typo!!)

"Bob Phillips" wrote:

=IF(A2+B2A3+A3,A1,A4)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"hip" wrote in message
...

I can't quite get it right.

Let me lay it out:

A1--------A2-----A3------A4
Team 1--score--score--team 2
B1--------B2-----B3-------B4
Team 1--score--score--team 2
-------------------------------------c6
-----------------------------------winner

The idea is that you enter the score between 2 teams in A2 & A3 with
the winner being placed in C6. Easy enough.

However this is for soccer and it could go into penalties. That's why
we have Row B in there.

I can't come up with a formula that will say something to the effect
of:

if team 1 wins they go into c6, if team 2 wins they go into c 6, if
it's a tie then refer to row B and do the same thing. :eek:


--
hip
------------------------------------------------------------------------
hip's Profile:

http://www.excelforum.com/member.php...o&userid=31954
View this thread: http://www.excelforum.com/showthread...hreadid=549033





Bob Phillips

IF & AND statements
 
I laid it out incorrectly at forts, by columns not rows, and only just
spotted it as I was posting. That's my excuse anyway <G

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Ian P" wrote in message
...
Much more elegant Bob! (even with the typo!!)

"Bob Phillips" wrote:

=IF(A2+B2A3+A3,A1,A4)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"hip" wrote in

message
...

I can't quite get it right.

Let me lay it out:

A1--------A2-----A3------A4
Team 1--score--score--team 2
B1--------B2-----B3-------B4
Team 1--score--score--team 2
-------------------------------------c6
-----------------------------------winner

The idea is that you enter the score between 2 teams in A2 & A3 with
the winner being placed in C6. Easy enough.

However this is for soccer and it could go into penalties. That's why
we have Row B in there.

I can't come up with a formula that will say something to the effect
of:

if team 1 wins they go into c6, if team 2 wins they go into c 6, if
it's a tie then refer to row B and do the same thing. :eek:


--
hip


------------------------------------------------------------------------
hip's Profile:

http://www.excelforum.com/member.php...o&userid=31954
View this thread:

http://www.excelforum.com/showthread...hreadid=549033







hip

IF & AND statements
 

It worked, thanks Bob and Ian!


--
hip
------------------------------------------------------------------------
hip's Profile: http://www.excelforum.com/member.php...o&userid=31954
View this thread: http://www.excelforum.com/showthread...hreadid=549033



All times are GMT +1. The time now is 05:19 AM.

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