# Help with Formula

Options

I'm working on a formula that will look at cell A if it is = "Milestone" perform this function, if not do this. Have that working.

My issue is if the denominator is 0 is produces an error. I would like to add code to return 0 if denominator is 0. The top code is what I need to figure out. The bottom code is what is working.

if FF revenue recognized or total consumed is 0 return 0 (part I need to work into this)

• ✭✭✭✭✭✭
Options

Hello @dgdrinkard

Try this:

=IF(OR([FF Revenue Recognized-YTD]12 = 0, [Total Consumed]12 = 0), 0, IF([Hours Estimated]7 = "Milestone", (([FF Revenue Recognized-YTD]12 - [Total cost YTD]12) / [FF Revenue Recognized-YTD]12), (([Total Consumed]12 - [Total cost YTD]12) / [Total Consumed]12)))

Peggy

• ✭✭✭✭✭✭
Options

Hello @dgdrinkard

Try this:

=IF(OR([FF Revenue Recognized-YTD]12 = 0, [Total Consumed]12 = 0), 0, IF([Hours Estimated]7 = "Milestone", (([FF Revenue Recognized-YTD]12 - [Total cost YTD]12) / [FF Revenue Recognized-YTD]12), (([Total Consumed]12 - [Total cost YTD]12) / [Total Consumed]12)))

Peggy

• Options

Thank you. That did it!

• ✭✭✭✭✭✭
Options

Awesome! Happy to help.