+ Reply to Thread
Results 1 to 6 of 6

Multilple IF and LOOKUP statements

  1. #1
    Registered User
    Join Date
    01-17-2014
    Location
    Swindon, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Multilple IF and LOOKUP statements

    HI

    I am setting up a pricing grid and am having no luck doing multiple look ups and if statements.

    My trouble is that I have 8 columns of different prices as each price depends on quantity of the job so I need to do 8 if statements and 8 lookups to match to find the correct price per volume.

    First I need to check the cell D12 for the quantity and then that cell G21 is populated before doing a look up on the correct price.

    I am using the following which works OK but when I try to add a third IF/Look-UP it does not work as there are too many statements;
    =IF(D12<5001,IF(G21="*"," ",VLOOKUP(G21,Sheet1!$A$4:Sheet1!$J$29,3)),IF(D12<10001,IF(G21="*"," ",VLOOKUP(G21,Sheet1!$A$4:Sheet1!$J$29,4))))

    Are there any other ways I can add so many statements – maybe other types of command?
    Any ideas? Thanks!

  2. #2
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: Multilple IF and LOOKUP statements

    I don't know what you mean by too many statements? Are you getting some kind of error message?

  3. #3
    Registered User
    Join Date
    01-17-2014
    Location
    Swindon, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Multilple IF and LOOKUP statements

    Sorry, the message is "You've entered too many arguments for this function." not too many statements

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Multilple IF and LOOKUP statements

    Can you post a sample file, there's probably quick way of doing it in ONE statement
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Registered User
    Join Date
    01-17-2014
    Location
    Swindon, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Multilple IF and LOOKUP statements

    I think that i have got around this by A) putting my arguements in the correct place inside the brackets!!!! and B) keeping the data for the look up on the same work sheet rather than a separate one so reducing the amount of code.

    It now works ok having 8 IF / Lookup arguements as follows;

    =IF($D$12<5001,VLOOKUP(G21,$A$4:$J$39,3),IF($D$12<10001,VLOOKUP(G21,$A$4:$J$39,4),IF($D$12<25001,VLOOKUP(G21,$A$4:$J$39,5),IF($D$12<50001,VLOOKUP(G21,$A$4:$J$39,6),IF($D$12<100001,VLOOKUP(G21,$A$4:$J$39,7),IF($D$12<200001,VLOOKUP(G21,$A$4:$J$39,8),IF($D$12<500001,VLOOKUP(G21,$A$4:$J$39,9),IF($D$12<1000001,VLOOKUP(G21,$A$4:$J$39,10)))))))))

  6. #6
    Registered User
    Join Date
    06-05-2015
    Location
    Manchester, UK
    MS-Off Ver
    2016
    Posts
    94

    Re: Multilple IF and LOOKUP statements

    It's definitely the former rather than the latter. You've entered too many arguments for this function doesn't mean your formula is too long, it means your syntax is wrong.

    So for example if you entered the following:

    =SUMIF(A:A,D1,B:B,D2)

    It would return an error. The formula asks for 3 pieces of information seperated by commas and you've given it four. I've never come across a limit for the length of the formula itself.

    Hope this helps.

+ 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. How to Combine Multilple workbooks/tabs into one?
    By Sharkee88 in forum Excel General
    Replies: 4
    Last Post: 11-06-2014, 12:57 PM
  2. Multilple functions in nested IF
    By Vestlink in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 11-19-2009, 04:43 PM
  3. Summing from multilple sheets
    By tahirawan11 in forum Excel General
    Replies: 3
    Last Post: 07-30-2007, 11:28 PM
  4. How do I lookup multilple criteria and return a single value
    By StephenAccountant in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-08-2006, 10:30 PM
  5. multilple nested if statements in one cell
    By Rick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-02-2006, 03:25 AM

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