IF Condition

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
try this in H2:
=IFERROR(IF(AND(D2="In Progress",F2<E2/2),(E2/2)-F2,IF(AND(D2="Closed",G2>0),G2,0)),0)
 
Upvote 0
Thank you for posting a sample, but it would be easier for everyone if your download was an Excel spreadsheet so that we didn't have to recreate your sample.
Assuming your status is either In Progress or Closed, perhaps this:
=IF(D2="In Progress",IF(F2<E2/2,(E2/2)-F2,0),MAX(G2,0))
 
Last edited:
Upvote 0
not sure what happened with my formula - should have been:
<e2 2),(e2="" 2)-f2,if(and(d2="Closed" ,g2=""><e2 2),="" (e2="" 2)-f2,="" if(and(d2="Closed" ,g2=""><e2 2),(e2="" 2)-f2,if(and(d2="Closed" ,g2=""><e2 2),(e2="" 2)-f2,if(and(d2="Closed" ,g2=""><e2*.5),(e2*.5)-f2,if(and(d2="closed",g2>
=IFERROR(IF(AND(D2="In Progress",F2 < E2/2),(E2/2)-F2,IF(AND(D2="Closed",G2 > 0),G2,0)),0)

see if that works better</e2*.5),(e2*.5)-f2,if(and(d2="closed",g2></e2></e2></e2></e2>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,749
Messages
6,186,802
Members
453,373
Latest member
Ereha

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