+ Reply to Thread
Results 1 to 6 of 6

Too many arguments!

  1. #1
    Registered User
    Join Date
    01-15-2008
    Posts
    10

    Too many arguments!

    Ok so I can't figure this out. I am creating a worksheet to figure out commission on the sales of cell phones and phone accessories. I have created a list of phones and accessories but I put them on 2 different worksheets. I am using an if function to determine whether or not the sale is a phone or an accessory and how many there are this is the formula I created

    =if(d2="Phone",if(f2="",vlookup(e2,'Handset Pricing Matrix'!$A$2:$B$50,2,"FALSE"),(vlookup(e2,'Handset Pricing Matrix'!$A$2:$B$50,2,"FALSE")*f2),if(d2="Accessory",if(f2="",vlookup(e2,Accessories!$A$1:$B$202,2,"FALSE"),(vlookup(e2,Accessories!$A$1:$B$202,2,"FALSE")*f2),"")

    d2 = type of sale (phone or accessory)
    e2 = name of product
    f2 = number sold

    i am getting a too many arguments error any suggestions?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Looks like you have a parenthesis in the wrong place, furiousboy, but you can probably simplify a little and avoid repeating the VLOOKUP, try

    =if(d2="Phone",vlookup(e2,'Handset Pricing Matrix'!$A$2:$B$50,2,FALSE)*IF(F2="",1,F2),if(d2="Accessory",vlookup(e2,Accessories!$A$1:$B$202,2, FALSE)*IF(F2="",1,F2),""))

  4. #4
    Registered User
    Join Date
    01-15-2008
    Posts
    10
    wow that worked, was it just because of the capitalization? It usually just capitalizes it for me and I don't worry about it Thanks!

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by furiousboy
    wow that worked, was it just because of the capitalization? It usually just capitalizes it for me and I don't worry about it Thanks!
    No, it wasn't the Capitalization of the functions, it was as daddylongleg's mentioned, you had misplaced parenthesis...so the IF(D2="Accessory "... part wasn't getting looked at and Excel saw it as you try to stick 2 separate formulas in 1 cell..

    also, the FALSE in the Vlookup doesn't need the quotations..

  6. #6
    Registered User
    Join Date
    01-15-2008
    Posts
    10
    oh i see yeah thank you very much guys

+ 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