Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

NEED HELP with openoffice calc formulae

Options
  • 05-12-2013 9:56pm
    #1
    Registered Users Posts: 17


    I am trying to write a simple (or what i think should be simple) formula into open office calc and i cant get it to work how i want it to.

    What i am trying to achieve is to count as 1 if a cell and the next cell both contain a number that is bigger than 0 (ie 1.2.3.4.5.6...etc) but the first cell is a larger number than the second.

    The formula i am using is =if(A1>0+B1>0+A1>B1;+1;+0) with the ; symbol used to seperate the test subject , the then value and the otherwise value.

    I used this to say : if A1 is greater than 0 AND B1 is greater than 0 AND A1 is greater than B1 then add 1 otherwise add 0.

    This doesnt work as when i make cell A1 =2 and cell B1 = 1 it counts as 0 when it should be adding 1 as both cells are > 0 and A1 > B1.

    Can anyone help if they can follow what i mean???

    Thanks


Comments

  • Registered Users Posts: 1,064 ✭✭✭Snowbat




  • Registered Users Posts: 1,064 ✭✭✭Snowbat


    You can use that as a test in an IF function, eg. =IF(AND(A1>0;B1>0;A1>B1);"+1";"+0").


  • Registered Users Posts: 1,091 ✭✭✭KAGY


    The formula i am using is =if(A1>0+B1>0+A1>B1;+1;+0) with the ; symbol used to seperate the test subject , the then val and the otherwise value

    Thanks

    That might work if you bracket every A1>0 etc. AND is a better method, but look into COUNTIF if you have more than two or three cells to test. something like if(countif(A1:Z1; ">0”);1;0)
    Any reason youre using 1 and 0 rather that TRUE/FALSE?
    Edit: reread your op what I posted won't work what you wanted. AND is what you need.


Advertisement