If with 3 criteria

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,173
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Sheet1

ABCDE
1Names Result
2Michael2000250024001
3John500045004500.151
4Simon1500.651490015000
5James1823.551400.2514000

<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: 64px"></colgroup><tbody>
</tbody>

if Names is John or James Column E=1 if D>=C else 0.
if Names is OTHER THAN John or James Column E=1 if D>=B else 0.
For error E=null.
What should the formula be in column E?
Thanx in adv.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,426
Office Version
  1. 2019
Try (untested)

in E2
=IF(OR(AND(OR(A2="John",A2="James"),D2>=C2),AND(AND(A2<>"John",A2<>"James"),D2>=B2)),1,0)
 
Upvote 0

par60056

Well-known Member
Joined
Jul 26, 2012
Messages
1,581
Office Version
  1. 2011
  2. 2010
Platform
  1. Windows
  2. MacOS
I'm not sure what you want to test for error. I'm sure you can add that.

Would this work?

=IF(OR(A2="James",A2="John"),IF(D2>C2,1,0),IF(D2>B2,1,0))
 
Upvote 0

par60056

Well-known Member
Joined
Jul 26, 2012
Messages
1,581
Office Version
  1. 2011
  2. 2010
Platform
  1. Windows
  2. MacOS
ADVERTISEMENT
In E2:

=IF(AND(OR(A2="John",A2="James"),D2>=C2),1,IF(D2>=B2,1,0))


I don't think that this works. If john or james and d2 < c2 and d2 > <c2 but="" d2="">b2 they will get a 1</c2>
 
Upvote 0

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,426
Office Version
  1. 2019
@bbott

That will produce 1 if...

AND(A2 < > "John",A2 < > "James") AND D2 < C2 AND D2 > = B2

which may or may not happen
 
Last edited:
Upvote 0

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,173
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
ADVERTISEMENT
Additionally:
column F=C if Names is John or James else B
How to accomplish?
 
Upvote 0

Forum statistics

Threads
1,195,590
Messages
6,010,612
Members
441,558
Latest member
lambierules

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
Top