Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

excel if then problem?

I am trying to get this formula to work.. Here are the conditions I need all in one cell..

If L5 is > or = m4, then add L5 + M4

If L5 is < m4, then (m4-L5) * -1

so.. basically if number is L5 is greater or equal to M4.. the two need to be added together and that new number needs to be displayed.

but if L5 is less than the value of M4.. then subtrack L5 from M4, then multiply the sum by negative 1.

2 Answers

Relevance
  • 7 years ago

    =IF(L5>=M4,L5+M4,-(M4-L5))

    You do not need a second IF statement since it is the IF Not case.

    Just a - before the bracket does the same as *-1.

  • Bill
    Lv 7
    7 years ago

    =IF(L5>=M4, L5+M4, L5-M4)

    -(a-b)=(b-a)

Still have questions? Get your answers by asking now.