Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Excel Calculation Help

  • 01-03-2023 12:14PM
    #1
    Registered Users, Registered Users 2 Posts: 8,548 ✭✭✭


    I have the following calculation in an Excel 2007 worksheet and I need to tweak it slightly if anyone can help?

    =IF(SUM(A18)>0,SUM(A18*E18),"")

    The above Calc multiplies cell A18 by Cell E18 and displays the result in cell F18 but only if cell A18 has a value greater than 0 and it works fine, however, I want to change it slightly to stop it placing a zero in cell F18 once a value is put into cell A18

    I want the calc above to work only if the value in both A18 and E18 is greater than zero.

    "Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid."



Comments

  • Registered Users, Registered Users 2 Posts: 41,306 ✭✭✭✭ohnonotgmail


    =IF(AND(SUM(A18)>0,SUM(E18)>0),SUM(A18*E18),"")

    though I would question why you need the sum if it only looks at 1 cell. this does the same thing without the sum

    =IF(AND(A18>0,E18>0),SUM(A18*E18),"")



  • Registered Users, Registered Users 2 Posts: 8,548 ✭✭✭Gadgetman496


    Thank you so much ohnonotgmail, that works exactly as I wanted it to, really appreciate the help and speedy reply.

    To answer your question, I have no idea why the SUM was there if not needed, I have very little experience with this stuff along with being an old man, my maths are letting me down too I guess :)

    The SUM is removed as per your second example and all working fine.

    Thanks again.

    "Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid."



  • Registered Users, Registered Users 2 Posts: 41,306 ✭✭✭✭ohnonotgmail


    actually you dont need the other sum either. this is all you need.

    =IF(AND(A18>0,E18>0),A18*E18,"")



  • Registered Users, Registered Users 2 Posts: 8,548 ✭✭✭Gadgetman496


    I love people who simplify things like that, cheers :)

    "Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid."



Advertisement
Advertisement