Matching 3 conditions

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Can someone help me with a formula in column D to generate 'Result' meeting 3 conditions?
Thanks in adv.
Sheet1

ABCDEFG

<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #ffff00, align: center"]Result[/TD]
[TD="bgcolor: #99cc00, align: center"]Condition 1[/TD]
[TD="bgcolor: #99cc00, align: center"]Condition 2[/TD]
[TD="bgcolor: #99cc00, align: center"]Condition 3[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]500[/TD]
[TD="bgcolor: #ffff00, align: right"]1[/TD]
[TD="bgcolor: #99cc00"]A<b< td=""></b<>[/TD]
[TD="bgcolor: #99cc00"]B<c< td=""></c<>[/TD]
[TD="bgcolor: #99cc00"]A<c< td=""></c<>[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]500[/TD]
[TD="bgcolor: #ffff00, align: right"]2[/TD]
[TD="bgcolor: #99cc00"]A<b< td=""></b<>[/TD]
[TD="bgcolor: #99cc00"]B>=C[/TD]
[TD="bgcolor: #99cc00"]A<c< td=""></c<>[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]200[/TD]
[TD="bgcolor: #ffff00, align: right"]3[/TD]
[TD="bgcolor: #99cc00"]A<b< td=""></b<>[/TD]
[TD="bgcolor: #99cc00"]B>=C[/TD]
[TD="bgcolor: #99cc00"]A>=C[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]100[/TD]
[TD="bgcolor: #ffff00, align: right"]4[/TD]
[TD="bgcolor: #99cc00"]A>=B[/TD]
[TD="bgcolor: #99cc00"]B>=C[/TD]
[TD="bgcolor: #99cc00"]A>=C[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]250[/TD]
[TD="bgcolor: #ffff00, align: right"]5[/TD]
[TD="bgcolor: #99cc00"]A>=B[/TD]
[TD="bgcolor: #99cc00"]B<c< td=""></c<>[/TD]
[TD="bgcolor: #99cc00"]A>=C[/TD]

[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]500[/TD]
[TD="bgcolor: #ffff00, align: right"]6[/TD]
[TD="bgcolor: #99cc00"]A>=B[/TD]
[TD="bgcolor: #99cc00"]B>=C[/TD]
[TD="bgcolor: #99cc00"]A<c< td=""></c<>[/TD]

</tbody>

E2 condition: A<B
F2 condition: B<C
G2 condition: A<C
E3 condition: A<B
G3 condition: A<C
F6 condition: B<C
G7 condition: A<C
 
Last edited:

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Some formulas did not 'appear' thr' Excel Jeanie so wrote below Aladin.
 
Upvote 0
Reposted..
Sheet1

ABCDEFG

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 48px"><col style="WIDTH: 48px"><col style="WIDTH: 48px"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #ffff00, align: center"]Result[/TD]
[TD="bgcolor: #99cc00, align: center"]Condition 1[/TD]
[TD="bgcolor: #99cc00, align: center"]Condition 2[/TD]
[TD="bgcolor: #99cc00, align: center"]Condition 3[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]500[/TD]
[TD="bgcolor: #ffff00, align: right"]1[/TD]
[TD="bgcolor: #99cc00"]A<B[/TD]
[TD="bgcolor: #99cc00"]B<C[/TD]
[TD="bgcolor: #99cc00"]A<C[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]500[/TD]
[TD="bgcolor: #ffff00, align: right"]2[/TD]
[TD="bgcolor: #99cc00"]A<B[/TD]
[TD="bgcolor: #99cc00"]B>=C[/TD]
[TD="bgcolor: #99cc00"]A<C[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]200[/TD]
[TD="bgcolor: #ffff00, align: right"]3[/TD]
[TD="bgcolor: #99cc00"]A<B[/TD]
[TD="bgcolor: #99cc00"]B>=C[/TD]
[TD="bgcolor: #99cc00"]A>=C[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]100[/TD]
[TD="bgcolor: #ffff00, align: right"]4[/TD]
[TD="bgcolor: #99cc00"]A>=B[/TD]
[TD="bgcolor: #99cc00"]B>=C[/TD]
[TD="bgcolor: #99cc00"]A>=C[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]250[/TD]
[TD="bgcolor: #ffff00, align: right"]5[/TD]
[TD="bgcolor: #99cc00"]A>=B[/TD]
[TD="bgcolor: #99cc00"]B<C[/TD]
[TD="bgcolor: #99cc00"]A>=C[/TD]

[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]500[/TD]
[TD="bgcolor: #ffff00, align: right"]6[/TD]
[TD="bgcolor: #99cc00"]A>=B[/TD]
[TD="bgcolor: #99cc00"]B>=C[/TD]
[TD="bgcolor: #99cc00"]A<C[/TD]

</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
FINAL 6 conditions: somehow I wrote it....

6 conditions are there:
Condition 1: A is less than B; B is less than C and A is less than C
Condition 2: A is less than B; B is greater than or equal to C and A is less than C
Condition 3: A is less than B; B is greater than or equal to C and A is greater than or equal to C
Condition 4: A is greater than or equal to B; B is greater than or equal to C and A is greater than or equal to C
Condition 5: A is greater than or equal to B; B is less than C and A is greater than or equal to C
Condition 6: A is greater than or equal to B; B is greater than or equal to C and A is less than C
 
Upvote 0
I could get your point Aladin it is MATCHING 6 conditions..sorry for inconvenience
 
Upvote 0
Hi Sandeep

Please check your condition 6.

I think B < C in condition 6
 
Upvote 0
Try,

Code:
=IF(AND(A1< B1,B1< C1,A1< C1),1,IF(AND(A1< B1,B1> =C1,A1< C1),2,IF(AND(A1< B1,B1> =C1,A1> =C1),3,IF(AND(A1> =B1,B1> =C1,A1> =C1),4,IF(AND(A1> =B1,B1< C1,A1> =C1),5,IF(AND(A1> =B1,B1< =C1,A1< C1),6,"Not  Met"))))))

Replace space by blank
 
Last edited:
Upvote 0
It is showing the 'formula' only not the results (1,2,3,4,5,6)
 
Upvote 0
Thanks vds1 it WORKED. after removing blanks from 'within the formula'.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top