Combining 2 Formulas

J

Joker

I am having trouble combining two formulas to make one. The following
formulas each work but combining them results in ######. Example of what I am
calculating: Cell D9 is 10051202, cell D10 is 13286500, cell J9 is 17:05,
cell J10 is also 17:05 and cell J11 is 17:07. Is there anyway to combine the
two so it will calculate differently if D9 is not equal to 10051202? It will
also have to be combined with this formula as well.

=IF($D1=13328000,$J2-$J1,IF($D1=13328100,$J2-$J1,IF($D1=13328200,$J2-$J1,IF($D1=13280300,$J2-$J1,IF($D1=13280800,$J2-$J1,IF($D1=13288100,$J2-$J1))))))

=IF(($D9<>10051202)*($D10=13286500),$J11-$J10) This works alone

=IF(($D9=10051202)*($D10=13286500),$J9-$J10) This works alone

=IF(($D9<>10051202)*($D10=13286500),$J11-$J10),IF(($D9=10051202)*($D10=13286500),$J9-$J10) They do not work when combined

Thank you for your help
 
B

Bernard Liengme

Forget the IFs and for your combined formula (last in your message) use
=($D9<>10051202)*($D10=13286500)*($J11-$J10)+($D9=10051202)*($D10=13286500)*($J9-$J10)
which can be simplified to
=(($D9<>10051202)*($J11-$J10)+($D9=10051202)*($J9-$J10))*($D10=13286500)
Your first formula can also be treated this way
best wishes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top