+ Reply to Thread
Results 1 to 7 of 7

Too few arguments for this function

  1. #1
    Registered User
    Join Date
    01-24-2012
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Too few arguments for this function

    I have modified a formula from my program in an effort to create a new worksheet. When trying to install this formula I get the dialog box stating : too few arguments.
    I have never had this comment before and don't understand how to rectify the issue. any help would be great

    =IFERROR(IF(A4:AE4="","",IF(A4:AE4="x",0,(IF(OR(A4:AE4="e"),"ELIM",(IF(OR(AF7="s"),"SCR",(IF(OR(A4:AE4="w"),"W/D",(IF(OR(A4:AE4="r"),"RET",SUM(A4:AE4,))))))))))))),"-")

    This formula needs to be expanded to include: A4:AE4="H"=Elim A4:AE4="F"=Elim

  2. #2
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: Too few arguments for this function

    Try this:

    Please Login or Register  to view this content.
    -------------
    Tony

  3. #3
    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,447

    Re: Too few arguments for this function

    Not entirely sure what you are trying to do because, as far as I know, you can't use IF with a range ... well, you can, but I think it just looks at the first cell.

    Anyway, this is accepted:

    =IFERROR(IF(A4:AE4="","",IF(A4:AE4="x",0,IF(OR(A4:AE4="e",A4:AE4="f",A4:AE4="h"),"ELIM",IF(AF7="s","SCR",IF(A4:AE4="w","W/D",IF(A4:AE4="r","RET",SUM(A4:AE4))))))),"-")


    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


  4. #4
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: Too few arguments for this function

    You're right TMShucks, it only seems to be using the first cell within the range, except in the case of the IF(OR(AF7="s") which only produces a value in the cell where the formula is located if there is also an "s" in A4.

  5. #5
    Registered User
    Join Date
    01-24-2012
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Too few arguments for this function

    Tony
    Your idea has removed the too few arguments, however it does not do the required calculations.
    I have attached a dummy worksheet, which hopefully better explains the outcome needed.

    Greg
    Attached Files Attached Files

  6. #6
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: Too few arguments for this function

    It appears a cell referenced is not correct. Your formulas on the example worksheet all have a #REF! in them in place of where IF(OR(AF7="s") would be on the first line of data.

    Please Login or Register  to view this content.
    What is it your are trying to SUM the total of? There aren't any numbers to add up...

  7. #7
    Registered User
    Join Date
    01-24-2012
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Too few arguments for this function

    Hello Tony
    Sorry about the #REF! I overlooked that one when I eliminated the sensitive data. I have now changed it on the attached sample.
    Regarding what am I trying to SUM.
    Row 4 and row 18 have numbers, so the formula needs to do a total, except where a letter value has been installed these would have to show the value of the letter. ie "S"=SCR "F"=Elim etc

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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