# 2 Criteria IF Statement

This is a discussion on 2 Criteria IF Statement within the Excel Questions forums, part of the Question Forums category; simply want to say if Home Team is A, and Home Score is greater than Away Score, use AHW (A ...

1. ## 2 Criteria IF Statement

simply want to say if Home Team is A, and Home Score is greater than Away Score, use AHW (A Home Win)

Only bothered about teams A & B so 8 possible combinations.

Hope someone can help me..

Thanks

 A B C D E 1 Home Team HomeScore Away Score Away Team Result 2 A 1 2 C AHL 3 A 3 0 D AHW 4 B 4 1 E BHW 5 B 2 3 F BHL 6 G 3 2 A AAL 7 H 1 2 A AAW 8 D 5 1 B BAL 9 C 1 3 B BAW

2. ## Re: 2 Criteria IF Statement

Originally Posted by markhib
simply want to say if Home Team is A, and Home Score is greater than Away Score, use AHW (A Home Win)

Only bothered about teams A & B so 8 possible combinations.

Hope someone can help me..

Thanks

 A B C D E 1 Home Team HomeScore Away Score Away Team Result 2 A 1 2 C AHL 3 A 3 0 D AHW 4 B 4 1 E BHW 5 B 2 3 F BHL 6 G 3 2 A AAL 7 H 1 2 A AAW 8 D 5 1 B BAL 9 C 1 3 B BAW
May be this...

Sheet9

 A B C D E 1 Home Team Home Score Away Team Away Score Result 2 A 3 P 2 AHW 3 B 2 O 1 BHW 4 C 6 L 4 CHW 5 D 5 T 3 DHW 6 E 4 E 5 EHL 7 F 2 Q 1 FHW

 Cell Formula E2 =IF(B2>D2,A2&"HW",A2&"HL") E3 =IF(B3>D3,A3&"HW",A3&"HL") E4 =IF(B4>D4,A4&"HW",A4&"HL") E5 =IF(B5>D5,A5&"HW",A5&"HL") E6 =IF(B6>D6,A6&"HW",A6&"HL") E7 =IF(B7>D7,A7&"HW",A7&"HL")

Excel tables to the web >> Excel Jeanie HTML 4

3. ## Re: 2 Criteria IF Statement

Use the following formula in Cell F2 and copy down:

=IF(B2>C2,A2&"HW","")

Hope this helps.

4. ## Re: 2 Criteria IF Statement

=if(or(a2={"a","b"}),a2&"h"&if(b2>c2,"w","l"),if(or(d2={"a","b"}),d2&"a"&if(b2>c2,"l","w")))

5. ## Re: 2 Criteria IF Statement

Originally Posted by Robert Mika
=if(or(a2={"a","b"}),a2&"h"&if(b2>c2,"w","l"),if(or(d2={"a","b"}),d2&"a"&if(b2>c2,"l","w")))
Are you sure the formula is working...?
Sheet9

 A B C D E 1 Home Team Home Score Away Team Away Score Result 2 A 3 P 2 Ahl

 Cell Formula E2 =IF(OR(A2={"a","b"}),A2&"h"&IF(B2>C2,"w","l"),IF(OR(D2={"a","b"}),D2&"a"&IF(B2>C2,"l","w")))

Excel tables to the web >> Excel Jeanie HTML 4

6. ## Re: 2 Criteria IF Statement

Originally Posted by proficient
Are you sure the formula is working...?
Sheet9

 A B C D E 1 Home Team Home Score Away Team Away Score Result 2 A 3 P 2 Ahl

 Cell Formula E2 =IF(OR(A2={"a","b"}),A2&"h"&IF(B2>C2,"w","l"),IF(OR(D2={"a","b"}),D2&"a"&IF(B2>C2,"l","w")))

Excel tables to the web >> Excel Jeanie HTML 4
works here:
Sheet1

 A B C D E F 1 Home Team HomeScore Away Score Away Team Result 2 A 1 2 C AHL Ahl 3 A 3 0 D AHW Ahw 4 B 4 1 E BHW Bhw 5 B 2 3 F BHL Bhl 6 G 3 2 A AAL Aal 7 H 1 2 A AAW Aaw 8 D 5 1 B BAL Bal 9 C 1 3 B BAW Baw 10 A 3 2 P Ahw

 Cell Formula F2 =IF(OR(A2={"a","b"}),A2&"h"&IF(B2>C2,"w","l"),IF(OR(D2={"a","b"}),D2&"a"&IF(B2>C2,"l","w"))) F3 =IF(OR(A3={"a","b"}),A3&"h"&IF(B3>C3,"w","l"),IF(OR(D3={"a","b"}),D3&"a"&IF(B3>C3,"l","w"))) F4 =IF(OR(A4={"a","b"}),A4&"h"&IF(B4>C4,"w","l"),IF(OR(D4={"a","b"}),D4&"a"&IF(B4>C4,"l","w"))) F5 =IF(OR(A5={"a","b"}),A5&"h"&IF(B5>C5,"w","l"),IF(OR(D5={"a","b"}),D5&"a"&IF(B5>C5,"l","w"))) F6 =IF(OR(A6={"a","b"}),A6&"h"&IF(B6>C6,"w","l"),IF(OR(D6={"a","b"}),D6&"a"&IF(B6>C6,"l","w"))) F7 =IF(OR(A7={"a","b"}),A7&"h"&IF(B7>C7,"w","l"),IF(OR(D7={"a","b"}),D7&"a"&IF(B7>C7,"l","w"))) F8 =IF(OR(A8={"a","b"}),A8&"h"&IF(B8>C8,"w","l"),IF(OR(D8={"a","b"}),D8&"a"&IF(B8>C8,"l","w"))) F9 =IF(OR(A9={"a","b"}),A9&"h"&IF(B9>C9,"w","l"),IF(OR(D9={"a","b"}),D9&"a"&IF(B9>C9,"l","w"))) F10 =IF(OR(A10={"a","b"}),A10&"h"&IF(B10>C10,"w","l"),IF(OR(D10={"a","b"}),D10&"a"&IF(B10>C10,"l","w")))

Excel tables to the web >> Excel Jeanie HTML 4

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•