Thanks for sharing your problem with us. I understand you are looking for a formula to return a value based on condition. Developing a formula for the condition and output you require is possible. As I don’t have your dataset, I have taken the following dataset:
Assuming that you will start applying the formula from cell G9, I have applied the following formula in cell G9 and used the Fill Handle tool to copy the formula in the remaining cells.
=IF(F7>F9,(F7-F9)*E9,"Condition not met.")
I hope this formula will accomplish your required task. If you want a more specific formula, please share a sample dataset with us.