Hi Everyone

I've got an nested if statement that has grown from 7 to 8, which means it won't work

The formula is as follows:

=IF(AND($O3="SURPLUS",$BO3<>""),$BO3-$BF3,IF(AND($O3="SURPLUS",$BO3=""),TODAY()-$BF3,IF(AND($O3="HPP",$AV3="Not Applicable"),$BO3-$Q3,IF(AND($O3="HPP",$AV3<>""),$AV3-$Q3,IF(AND($O3="HPP",$BO3<>""),$BO3-$Q3,IF(AND($O3="HPP",$BO3=""),TODAY()-$Q3,IF(AND($O3="DEPOT",$BO3<>""),$BO3-$J3,IF(AND($O3="DEPOT",$BO3=""),TODAY()-$J3,""))))))))

Just wondering how i'd go about writing a formula to do all of this, with the capacity to expand further if necessary.

Any help you could provide would be really appreciated!

Cheers