+ Reply to Thread
Results 1 to 7 of 7

IF Statement - Nested - Error saying Missing Parentheses

Hybrid View

  1. #1
    Registered User
    Join Date
    06-30-2016
    Location
    toronto
    MS-Off Ver
    2013
    Posts
    1

    IF Statement - Nested - Error saying Missing Parentheses

    Hi Team

    I am trying to set up a waiting list calculation for my client and am using a nested IF AND statement for the first time.

    I get the error that I am missing parentheses but I don't know where??

    =if(and(d4="", b4<>"",$b$1-b4,0),IF(and(d4<>"",b4<>"",d4-b4,)

    ** if d4 is empty and b4 is not empty - use b1-b4 as the formula
    ** if d4 is not empty and b4 is not empty - use d4-b4 as the formula

    I even added an extra parentheses at the end and then it tells me it is not sure whether I want to enter a formula or text and tells me to click Help.

    I'm not sure now what is wrong with the formula....can anyone assist?

  2. #2
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: IF Statement - Nested - Error saying Missing Parentheses

    =if(and(d4="", b4<>""),$b$1-b4,IF(and(d4<>"",b4<>""),d4-b4,0))
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

  3. #3
    Valued Forum Contributor
    Join Date
    01-08-2011
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2007 to 2016
    Posts
    456

    Re: IF Statement - Nested - Error saying Missing Parentheses

    Try this:

    =IF(AND(D4="",B4<>""),$B$1-B4,IF(AND(D4<>"",B4<>""),D4-B4,0))
    Excel is a constant learning process and it's great to help each other. If any of us have helped you today, a click on the "reputation" star on the left is appreciated.

  4. #4
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: IF Statement - Nested - Error saying Missing Parentheses

    Just realised there is a simpler way to do this:
    =IF(B4="",0,IF(D4="",$B$1-B4,D4-B4))
    or
    =IF(B4="",0,IF(D4="",$B$1,D4)-B4)
    Last edited by gak67; 06-30-2016 at 07:27 PM.

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: IF Statement - Nested - Error saying Missing Parentheses

    how about if
    B4 is empty
    D4 is not empty
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  6. #6
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: IF Statement - Nested - Error saying Missing Parentheses

    Quote Originally Posted by vlady View Post
    how about if
    B4 is empty
    D4 is not empty
    Because zaiminc had the ,0 in their first IF statement I assumed that if B4 is empty the result will be 0, regardless of what is in D4. If this is wrong and they can explain their logic further I will amend the formula.

  7. #7
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: IF Statement - Nested - Error saying Missing Parentheses

    oopps sorry..
    question was for the OP for further clarifications.

    Regards,
    Vlady

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Nested IF statement error. Nested True statement is not triggering
    By Lucas7040 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-26-2016, 11:41 AM
  2. Missing formula parentheses.
    By ThursRed in forum Excel General
    Replies: 6
    Last Post: 08-13-2015, 12:53 AM
  3. [SOLVED] Nested AND statement Error
    By mdovey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2013, 08:41 PM
  4. [SOLVED] IS ERROR with nested if statement
    By renden in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2012, 05:46 AM
  5. Missing parentheses or too many arguments?
    By frenkile in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2011, 05:00 PM
  6. Error on Nested If Statement
    By ValentineNicole in forum Excel General
    Replies: 5
    Last Post: 02-18-2011, 03:29 PM
  7. Replies: 3
    Last Post: 11-26-2009, 03:39 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1