The value in Col. U will determine which of the following formula will be used. The formula in Col. V will be used when there nothing in Col. U, and the formula in Col. W will be used when there's a value in Col. U. As a result, the outcome will be placed under Col. V or W depending on which calculation took place. Is it possible to combine these two formulas and placed it under Col. V so the answer will only show up under Col. V. V2: =IF(U2<>"","",IF(D2="S",F2*(K2+M2)-R2,IF(D2="B",F2*(-K2-M2)-R2,"")))

W2: =IF(U2="","",IF(D2="S",U2*(K2+M2)-R2,IF(D2="B",U2*(-K2-M2)-R2)))

Sorry for my long and messy formulas, I'm not very good at it. That's why I need help. I will provide more info if it's needed.

TIA.

I haven't tested this with values in each cell, but I believe this is what you are looking for. =IF(U2="",IF(D2="S",F2*(K2+M2)-R2,IF(D2="B",F2*(-K2-M2)-R2,"")),

IF(D2="S",U2*(K2+M2)-R2,IF(D2="B",U2*(-K2-M2)-R2)))It may be possible to shorten it by using =IF(AND...) but I'll leave that for you work on.

e.g.

=IF(AND(U2="",D2="S")...

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

It does exactly what I was looking for. Thanks you very much. I've thought about using AND in something like this, but I have no idea how or where to insert it. I always get lost with long formulas. Can you show me how it should be done? Thanks again.

Ask Your Question

Weekly Poll