IF Condition

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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