LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Arithmatic

    Employee
    Posted 07-05-2016 15:50

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: dunkleym

    Hi All

    can finally say that arithmetic has beaten me...

    Seeking some advice please... I have 2 columns of data that I need to work a percentage on. However, Column 2 can have "0" so therefore I can't use

    ((Col A / Col B)-1) as it will return an error saying can't divide by 0.

    Is someone able to help me return a result that will say that if Col B is 0 or null return a value of 1 or 100%?

    Kind Regards

    Matt


  • 2.  RE: Arithmatic

    Employee
    Posted 07-05-2016 16:54

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    You can use this:
    if ColB<>0 then myResult=((Col A / Col B)-1) else myResult=1