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.
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.