Adding an If function with a revenue spread formula

BeadyBob

New Member
Joined
Feb 12, 2018
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a lovely formula that calculates revenue spread between two dates and distributes across month columns. I received help with this through Mr. Excel.
I now need to add an if statement to this formula. l would appreciate if someone could help me with the best way to do that.

Here is how the formula began:
=IFERROR(MAX(0,MIN($S4+1,EDATE(AM$2,1))-MAX($Q4,AM$2))/($S4-$Q4+1)*$N4,0)

Here is what I have done to it in an attempt to only calculate revenue spread if the project status is active.
=IFERROR(IF([@Status]="active",(MAX(0,MIN($S4+1,EDATE(AM$2,1))-MAX($Q4,AM$2))/($S4-$Q4+1)*$N4),0),0)

FYI, the status is an xlookup from another tab.
I thought this change to the formula was working until I realized I just broke the formula. It doesn't calculate monthly revenue regardless of status now.
I hope this is a simple issue of misplacing the if statement. Suggestions are greatly appreciated. Thank you.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
=IF([@Status]="active",IFERROR((MAX(0,MIN($S4+1,EDATE(AM$2,1))-MAX($Q4,AM$2))/($S4-$Q4+1)*$N4),0),0)
 
Upvote 1
Solution

Forum statistics

Threads
1,221,418
Messages
6,159,790
Members
451,589
Latest member
Harold14

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