Results 1 to 8 of 8

If and Vlookup formula; too many arguments

Threaded View

  1. #1
    Registered User
    Join Date
    03-25-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    49

    If and Vlookup formula; too many arguments

    Hey.

    Im not sure if all the formulas that i meantion in this thread will be 100 correct since im not using a english version of excel.

    Im trying to build a little database and the closest thing i have come to manage what i want to do is with IF and Vlookup function.

    I have 1 "main page" lets call it "sheet1"
    Then i have nomerous of "secondary pages" we call them "sheet2", "sheet3" etc.

    The idea is that on my "main page" im using 3 colums "A","B" and "C". "A" and "B" helps deciding where my VLOOKUP function should find the correct value.

    The "A" column is planned to decide in what sheet to look for seach word(which is written in "C" column)

    Basicly if "A1" is saying "2" its gonna do my VLOOKUP in "sheet2" , and if "A1" sais "3" its gonna look for my "search word" in "sheet3" etc.

    My formula at this point (witch is working for 2 pages)
    =IF(A1=2;VLOOKUP(B1;sheet1!A1:B6;2;FALSE);IF(A1=3;VLOOKUP(B1;sheet2!A1:B6;2;FALSE)))

    This is working perfectly.
    If i write "2" in "A1" and "car" in "B1" VLOOKUP jumps to "sheet1" lookup "car" and return the value in the second column (in this case 2"
    and if i write "3" in "A1" and keep "car" in "B1" VLOOKUP jumps to "sheet2" and return the carvalue for this sheet (in this case 22).


    Then the problem
    The problem is ofcourse that if i wanna continue with this formula in the same box, i wanna make it keep looking in more sheets depending on what number i have in "A1"
    If i put number 5 in it goes to "sheet5" and look for "car" and return valuve.

    But at this point the formula is too big for excel.

    So i guess my question is. Is there any workaround for this? Can anyone come up how to approach this in another way? (im out of ideas)
    Or am i doomed and have to learn programming to get my idea to work?


    Any questions let me now. I can upload a excel example with my idea if its wanted.

    Any answears appriciated.

    /Magnus
    Last edited by Zheno; 11-26-2009 at 04:20 AM.

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