Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

NEED HELP with openoffice calc formulae

  • 05-12-2013 09:56PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 1,065 ✭✭✭Snowbat




  • Registered Users, Registered Users 2 Posts: 1,065 ✭✭✭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, Registered Users 2 Posts: 1,080 ✭✭✭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