Jan 06 2023 08:29 PM
Consider using the formula help to learn how to write the most efficient formulas. The shorter the formula the easier it is to sort out errors in logic, which is different to constructing the actual formula. Simple logic maked writing the formula easier.
Your formula is not efficient as it has unnecessary elements
This formula works and is efficient
IF(D4<=0 The condition you are seeking first is- D4 is less than or equal to 0 is called the logical test
E4, Is what you want if TRUE
Therefore if the logical test is FALSE it automatically follows that D4 must have a value more than 0. (your formula unnecessarily states this)
Therefore all you need to specify is what you want if the logical test is FALSE i.e. D4*E4
You only need one IF statement to cover both True and False per single logical test. Later you can nest multiple IF statements.
It would appear you are learning Excel, try using the formula analysis tool that pops up under the formula window, click on each element sentence to analyse your formula and you will see the errors. Have fun , Excel is great