+ Reply to Thread
Results 1 to 2 of 2

IF Function - Too Many Arguments

  1. #1
    Registered User
    Join Date
    01-29-2013
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    4

    IF Function - Too Many Arguments

    Hi,
    This is my first time to post a question, so please be patient.

    I am using excel 2007.

    I am trying to create a worksheet that will allow sales people to use a drop down menu in a cell to choose a text (species of wood) and by doing so it will assign a corresponding weight per board foot (a number) to the cell that contains the formula. I am trying to accomplish this by using an IF function and nesting all 11 of the species we produce in the formula but I keep getting errors.

    Here's the formula:

    =IF(I8="Ash",3.75,IF(I8="Basswood",2.03),IF(I8="Birch",3.6),IF(I8="Cedar",2.619),IF(I8="Hard&Maple",3.57),IF(I8="Hickory",4.2),IF(I8="Poplar",2.9),IF(I8="Red"&"Oak",3.7),IF(I8="Soft"&"Maple",3.03),(I8="Walnut",3.2),IF(I8="White"&"Oak",4.2))

    When I enter the above formula I get the following error: "You have entered too many arguments for this function"

    Help!!!
    Thanks!

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: IF Function - Too Many Arguments

    You're trying to nest your IF statements, but you're closing each one off with brackets with only one parameter in.

    Try:

    =IF(I8="Ash",3.75,IF(I8="Basswood",2.03,IF(I8="Birch",3.6,IF(I8="Cedar",2.619,IF(I8="Hard&Maple",3.57,IF(I8="Hickory",4.2,IF(I8="Poplar",2.9,IF(I8="Red"&"Oak",3.7,IF(I8="Soft"&"Maple",3.03,IF(I8="Walnut",3.2,IF(I8="White"&"Oak",4.2,"???")))))))))))

    Edited to add:

    Rather than nesting formula like this it's generally better to have a table in your sheet with all of the wood in one column and the weight in the column to the right of them, and then use a VLOOKUP.

    If you really wanted to do it in one formula then this is a bit neater than nested IF statements:

    =IFERROR(INDEX({3.75,2.03,3.6,2.619,3.57,4.2,2.9,3.7,3.03,3.2,4.2},MATCH(I8,{"Ash","Basswood","Birch","Cedar","HardMaple","Hickory","Poplar","RedOak","SoftMaple","Walnut","WhiteOak"},0)),"")
    Last edited by Andrew-R; 01-29-2013 at 08:33 PM.

+ 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