Combining Formulas

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

These three formulas need to be combined into a single formula:

1.) =IF(D7>E7,D7*H7) D7 greater than E7
Or (could these two be combined?)
2.) =IF(D7=E7,D7*H7) D7 equal to E7
Or
3.) =IF(D7<E7,((D7-E7)+(D7*H7))) D7 less than E7

Then the single formula will be used (copied) into the 90 rows below row 7.

Would this be better done with VBA in a module?
 
Phil said:
These three formulas need to be combined into a single formula:

1.) =IF(D7>E7,D7*H7) D7 greater than E7
Or (could these two be combined?)
2.) =IF(D7=E7,D7*H7) D7 equal to E7
Or
3.) =IF(D7<E7,((D7-E7)+(D7*H7))) D7 less than E7

Then the single formula will be used (copied) into the 90 rows below row 7.

Would this be better done with VBA in a module?

VBA is not necessary, I think:
=D7*H7+MIN(D7-E7,0)
 

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

Back
Top