Results 1 to 5 of 5

Thread: If statement

  1. #1
    New Member
    Join Date
    Jul 2018
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default If statement

    Hey guys I am stuck with a simple problem.
    Can anyone please help me out

    Basically I am doing sum of Q11:Q31

    I need it to sum and show the result but with few IF conditions

    cell C3 needs to have some data in it
    cell Q2 needs to have some data in it
    O33 needs to be equal to P33, V33 and W33

    If it does not meet conditions then it would show ERROR
    I have this formulae which works perfectly if P33=O33.
    However I am not able to do P33=O33=V33=W33


    Code:
    =IF(AND(C3<>"",Q2<>"",P33=O33),SUM(Q11:Q31),"ERROR")
    Can anyone please help me

  2. #2
    Board Regular
    Join Date
    Feb 2007
    Location
    England
    Posts
    3,702
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: help with If statement

    Hi,

    What does this mean:

    "O33 needs to be equal to P33, V33 and W33"

    Is it that O33 must equal the sum of P33 + V33 + W33? Or O33 = P33 and O33 = V33 and O33 = W33?

    Matty

  3. #3
    New Member
    Join Date
    Jul 2018
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: help with If statement

    hey Matty,
    Thanks for your reply.
    the value in O33 needs to be equal to the value in P33, V33,W33

    So if O33=1
    P33=1
    V33=1
    W33=1

    then i want it to sum
    However if the values does not match of all the 4 cell den it would show error

    Basically all the 4 cells must have the same value
    Last edited by patni; May 19th, 2019 at 08:10 AM.

  4. #4
    Board Regular
    Join Date
    Feb 2007
    Location
    England
    Posts
    3,702
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: help with If statement

    Hi,

    If O33, P33, V33 and W33 are all numeric, try:

    Code:
    =IF(AND(C3<>"",Q2<>"",STDEV(O33,P33,V33,W33)=0),SUM(Q11:Q31),"ERROR")
    Else:

    Code:
    =IF(AND(C3<>"",Q2<>"",O33=P33,O33=V33,O33=W33),SUM(Q11:Q31),"ERROR")
    Matty

  5. #5
    New Member
    Join Date
    Jul 2018
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: help with If statement

    Hey Matty,

    the above code works perfectly.
    Thank you so much for your help.
    Thank you

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •