+ Reply to Thread
Results 1 to 7 of 7

Formula if(countif) gives error message (too many argument)

  1. #1
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    Formula if(countif) gives error message (too many argument)

    Hi guys,

    I'm having an issue with one of my formula, I get an error message whenever I press enter. My Excel version is in French and the error message could be translated as "You've typed too many arguments"(not sure if that would be that translation in Excel though).

    Here is my formula:

    IF(COUNTIF($I$2:$I$894,F4),"YES",COUNTIF($G$2:$G$894,F4),"IN PROGRESS",F4) --> So basically, what I'm trying to do is that if I can find the value of F4 in the range $I$2:$I$894, it should say YES. Otherwise, if I can find the value of F4 in the range $G$2:$G$894, it should say "IN PROGRESS", and if both these conditions are not met, then it should bring the value of F4.

    That same formula with only 1 condition: IF(COUNTIF($I$2:$I$894,F4),"YES",F4) is actually working perfectly, but as soon as i try to add another condition, i get the error message.

    I'm not sure why this is not working, if anyone can help that would be much appreciated.


    Thx
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Formula if(countif) gives error message (too many argument)

    Try this:
    =IF(AND(COUNTIF($I$2:$I$894,F4)>=1,COUNTIF($G$2:$G$894,F4)=0),"YES",IF(AND(COUNTIF($G$2:$G$894,F4)>=1,COUNTIF($I$2:$I$894,F4)=0),"IN PROGRESS",IF(AND(COUNTIF($I$2:$I$894,F4)>=1,COUNTIF($G$2:$G$894,F4)>=1),F4)))

  3. #3
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Formula if(countif) gives error message (too many argument)

    incorrect syntax perhaps?
    https://www.excelforum.com/excel-new...arguments.html

    are you trying to use multiple ranges perhaps?
    https://www.excelforum.com/excel-new...arguments.html

    should you rethink your data structure?
    Last edited by AliGW; 10-26-2020 at 06:22 PM. Reason: Link to competing forum removed

  4. #4
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    Re: Formula if(countif) gives error message (too many argument)

    Thanks Belinda200, your formula worked indeed and I actually found a way to make it simpler and shorter. Thanks for your input!

    Best regards,
    Puppa

  5. #5
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    Re: Formula if(countif) gives error message (too many argument)

    Thanks for your input, however, another user helped me to find a working formula.

    Best regards

  6. #6
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Formula if(countif) gives error message (too many argument)

    Quote Originally Posted by PuppaVince View Post
    Thanks Belinda200, your formula worked indeed and I actually found a way to make it simpler and shorter. Thanks for your input!

    Best regards,
    Puppa
    Hi,
    You can post your solution here for others to learn : )

  7. #7
    Registered User
    Join Date
    10-22-2020
    Location
    Bali, Indonesia
    MS-Off Ver
    Microsoft office professional Plus 2013
    Posts
    9

    Re: Formula if(countif) gives error message (too many argument)

    My solution is pretty much the same but shorter as we don't need the AND function:

    =IF(COUNTIF($I$2:$I$894,F4),"YES, IF(COUNTIF($G$2:$G$894,F4), "In Progress", F4))

+ 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. [SOLVED] error message: argument not optional for CountIf function
    By MaartenRo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2020, 03:18 AM
  2. [SOLVED] Error Message When Combining IF and COUNTIF Functions
    By EverClever in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2017, 04:50 PM
  3. If formula - too many functions for this argument error
    By ashley72788 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-03-2017, 06:12 PM
  4. Using an IF argument & COUNTIF argument in the same cell formula
    By TommyK25 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-14-2013, 08:52 AM
  5. Using a Boolean function within an If statement: Argument not optional error message
    By elfsprin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2011, 04:12 PM
  6. Replies: 3
    Last Post: 04-28-2010, 05:54 PM
  7. [SOLVED] error message: compile error, argument not optional
    By Pierre via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2005, 11:05 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