+ Reply to Thread
Results 1 to 11 of 11

Parenthesis Error

  1. #1
    Registered User
    Join Date
    07-10-2015
    Location
    Cayman Islands
    MS-Off Ver
    Mac 2011
    Posts
    6

    Parenthesis Error

    Trying to use this formula "IF( G4=x, (DATE(YEAR(F4)+1,MONTH(F4),DAY(F4)), IF( H4=x, (DATE(YEAR(F4)+1.5,MONTH(F4),DAY(F4)), IF(I4=x,( DATE(YEAR(F4)+2,MONTH(F4),DAY(F4)))" to populate a field with a date from another cell after adding time to the date corresponding to a heading 1 year 1.5 year or 2 year, whichever has "x" under it. Can't seem to get it working. Anyone able to assist?
    Last edited by youngjc345; 07-12-2015 at 12:02 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,622

    Re: Parenthesis Error

    If x is text then it should be in double quotes ... "x"


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Parenthesis Error

    You don't need parens in front of date. Always be sure string references are in quotes. Clean up your long formula with Alt+Enter.

    Please Login or Register  to view this content.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    07-10-2015
    Location
    Cayman Islands
    MS-Off Ver
    Mac 2011
    Posts
    6

    Re: Parenthesis Error

    Valuable point but still didn't fix the error of "Parenthesis missing"

  5. #5
    Registered User
    Join Date
    07-10-2015
    Location
    Cayman Islands
    MS-Off Ver
    Mac 2011
    Posts
    6

    Re: Parenthesis Error

    Got rid of the error! now it says False regardless of any data inputs.

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Parenthesis Error

    Does G4 or H4 have an x in it? Is F4 a date?

    I'm also unclear on the difference between the 2nd and third IF statements. They both have the same test, therefore the 3rd one will never occur.

  7. #7
    Registered User
    Join Date
    07-10-2015
    Location
    Cayman Islands
    MS-Off Ver
    Mac 2011
    Posts
    6

    Re: Parenthesis Error

    The third should be I4. Apologies. F4 is a date. Find image attached for more details. Thanks!
    Screen Shot 2015-07-10 at 8.16.06 PM.png

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,627

    Re: Parenthesis Error

    Why do you have two tests for H4="x"? What's Year(F4)+1.5 supposed to do?

    Please Login or Register  to view this content.

    alternatively, use:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 07-11-2015 at 02:04 PM.
    Ben Van Johnson

  9. #9
    Registered User
    Join Date
    07-10-2015
    Location
    Cayman Islands
    MS-Off Ver
    Mac 2011
    Posts
    6

    Re: Parenthesis Error

    Hey proton thanks for your response.

    The duplicate H4 is an error that is supposed to be I4. The =DATE(YEAR(F4)+CHOOSE(MATCH("x",G4:I4,0),1,1.5,2),MONTH(F4),DAY(F4)) formula returns #N/A error.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,363

    Re: Parenthesis Error

    With a valid date (TODAY()) in F4 the formula works OK but how can you add 1.5 to a year: the year changes by 1 (as per G4).

  11. #11
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,627

    Re: Parenthesis Error

    Please Login or Register  to view this content.
    12, 18 & 24 are months to be added to F4 wrt G4:I4

+ 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. Parenthesis Help
    By Helgard25 in forum Excel General
    Replies: 5
    Last Post: 03-20-2015, 07:00 AM
  2. [SOLVED] Parenthesis help needed
    By Helgard25 in forum Excel General
    Replies: 14
    Last Post: 03-05-2015, 12:06 PM
  3. Parenthesis Help with SQL in VBA
    By jo15765 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2012, 03:32 AM
  4. Parenthesis
    By John Abbot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2007, 09:49 AM
  5. Parenthesis
    By GitFinger in forum Excel General
    Replies: 2
    Last Post: 03-31-2006, 10:30 AM

Tags for this Thread

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