4 IF criteria

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,213
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
4 IF criteria are there:

Output cell E3 (formula required for E3)

IF C3>B3 AND C3>D3, then E3=2
IF C3>B3 AND C3<D3, then E3=1
IF C3<B3 AND C3>D3, then E3=3
IF C3<B3 AND C3<D3, then E3=4

For other answers “” (null) required.

How to accomplish?
Thanks in advance.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
<d3, E3="1
<b3 C3="" AND=""><b3 E3="4
=if(and(c3>b3,c3>d3),2,if(and(c3>b3,c3>d3),3,""))

</b3></b3></d3,>
 
Upvote 0
=if(and(c3>b3,c3>d3),2,if(and(c3>b3,c3>??),3,"")

You example loses somthing in line 2 its not clear so where i put ?? you should put your formula. The syntax is here for you anyway.
 
Upvote 0
You have to be careful when posting less than and greater than signs on the forum as they get interpreted as HTML tags. I believe your requirements are:

Code:
IF C3>B3 AND C3>D3, THEN E3=2
IF C3>B3 AND C3<D3, THEN E3=1
IF C3<B3 AND C3>D3, THEN E3=3
IF C3<B3 AND C3<D3, THEN E3=4
ELSE ""

So this:


Book1
BCDE
32532
44571
58513
66594
7556
8655
Sheet1
Cell Formulas
RangeFormula
E3=IF(OR(C3=B3,C3=D3),"",CHOOSE(2*(C3>B3)+(C3>D3)+1,4,3,1,2))


WBD
 
Upvote 0
IF C3>B3 AND C3>D3, THEN E3=2
IF C3>B3 AND C3<D3, THEN E3=1
IF C3<B3 AND C3>D3, THEN E3=3
IF C3<B3 AND C3<D3, THEN E3=4
ELSE ""
[/code]

So this:

BCDE
32532
44571
58513
66594
7556
8655

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
E3=IF(OR(C3=B3,C3=D3),"",CHOOSE(2*(C3>B3)+(C3>D3)+1,4,3,1,2))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Thanks wideboydixon, your formula WORKS.
 
Upvote 0

Forum statistics

Threads
1,214,785
Messages
6,121,543
Members
449,038
Latest member
Guest1337

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