Consider 2nd IF if a criteria is met

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
column B & column C are variables
column E & column F are constants (2.5 & -2.5 respectively)

Output column is column H.
Please bear with my language...please

I am using H2<f2,-100,0)) and="" able="" to="" get="" correct="" answer.
=IF(B2>E2,100,IF(C2 is less than F2,-100,0))

<f2,-100,0))
<f2,-100,0))
But H4=Incorrect. Answer should be -100 since C4=-2.6 which is less than F4 i.e. as long as C is non zero the formula should consider 2nd IF.

What should be the 'correct' formula.
Sheet1

BCDEFGH
23.202.5-2.5100
33.2-2.42.5-2.5100
43.2-2.62.5-2.5100
50-4.772.5-2.5-100

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
H2=IF(B2>E2,100,IF(C2<f2,-100,0)< font="">)</f2,-100,0)<>
H3=IF(B3>E3,100,IF(C3<f3,-100,0)< font="">)</f3,-100,0)<>
H4=IF(B4>E4,100,IF(C4<f4,-100,0)< font="">)</f4,-100,0)<>
H5=IF(B5>E5,100,IF(C5<f5,-100< font=""></f5,-100<>

<tbody>
</tbody>

<tbody>
</tbody>

Many thanks for .....with me.</f2,-100,0))
</f2,-100,0))
</f2,-100,0))>
 
Last edited:

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
The answer in H4 shouldn't be -100 since B4>E4. The first IF-function returns True, which returns 100.

Or am I missing something?
 
Upvote 0
The answer in H4 shouldn't be -100 since B4>E4. The first IF-function returns True, which returns 100.

Or am I missing something?

Actually my formula is wrong. IF C is non zero than it should check IF C is greater than F<f &="" return="" -100="" but="" if="" c="" is="" zero="" than="" proceed="" to="" check="" b="" non=""> & return -100 & IF C is zero than it should check IF B is greater than E & return 100 else 0</f>
 
Last edited:
Upvote 0
Correct formula required: IF C is non zero than it should check F & IF C is greater than F<f &="" return="" -100="" but="" if="" c="" is="" zero="" than="" proceed="" to="" check="" b="" non=""> then return -100 BUT IF C is zero AND IF B is greater than E then return 100 else 0</f>
 
Upvote 0
Correct formula required: IF C is non zero than it should check F & IF C is greater than F<f &="" return="" -100="" but="" if="" c="" is="" zero="" than="" proceed="" to="" check="" b="" non=""> then return -100 BUT IF C is zero AND IF B is greater than E then return 100 else 0</f>

Try this:
=IF(AND(C4<>0,C4>F4),-100,IF(AND(C4=0,B4>E4),100,0))
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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