+ Reply to Thread
Results 1 to 2 of 2

Nested IF statement with VLOOKUP

  1. #1
    James Hamilton
    Guest

    Nested IF statement with VLOOKUP

    Hi,

    In layman's terms I want a formula that does:

    (A) a series of nested IF statements with VLOOKUPS that returns a figure
    (B) a series of nested IF statements with VLOOKUPS that returns another figure
    (C) adds both (A) and (B) together.

    My current formula is:
    =IF($O$64=1,VLOOKUP(G33,SL!$G$9:$AH$33,19)*50%+IF($O$71=1,VLOOKUP(G33,SL!$G$9:$AH$33,28,FALSE)))

    and it returns a figure, multiplies it by 50%, then adds it to the other
    figure from the second part of the formula. The above formula works.

    What I want to do is add a series of nested IFs to both parts of the
    formula; i.e.

    (A)=IF($O$64=1,VLOOKUP(G33,SL!$G$9:$AH$33,19)*50%,=IF($O$64=2,VLOOKUP(G33,SL!$G$9:$AH$33,19)*40%, etc, etc

    (B)IF($O$71=1,VLOOKUP(G33,SL!$G$9:$AH$33,28,if(IF($O$71=2,VLOOKUP(G33,SL!$G$9:$AH$33,28, etc, etc.

    (C) = (A)+(B)

    Please help. I'll be forever in your debt!


    James



  2. #2
    Biff
    Guest

    Re: Nested IF statement with VLOOKUP

    Hi!

    How many different variables can $O$64 be?

    Use another lookup or maybe choose:

    Something like this:

    =VLOOKUP(G33,SL!$G$9:$AH$33,19)*VLOOKUP($O$64,Table,2,0)+ the "B" formula

    Or:

    =VLOOKUP(G33,SL!$G$9:$AH$33,19)*CHOOSE($O$64,50%,40%,etc)+ the "B" formula

    Do the same thing with your "B" example.

    > (B)IF($O$71=1,VLOOKUP(G33,SL!$G$9:$AH$33,28,if(IF($O$71=2,VLOOKUP(G33,SL!$G$9:$AH$33,28,
    > etc,


    There's no difference in the above formula! The lookup is the same no matter
    what O71 is! I'm guessing that's just a typo.

    Biff

    "James Hamilton" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > In layman's terms I want a formula that does:
    >
    > (A) a series of nested IF statements with VLOOKUPS that returns a figure
    > (B) a series of nested IF statements with VLOOKUPS that returns another
    > figure
    > (C) adds both (A) and (B) together.
    >
    > My current formula is:
    > =IF($O$64=1,VLOOKUP(G33,SL!$G$9:$AH$33,19)*50%+IF($O$71=1,VLOOKUP(G33,SL!$G$9:$AH$33,28,FALSE)))
    >
    > and it returns a figure, multiplies it by 50%, then adds it to the other
    > figure from the second part of the formula. The above formula works.
    >
    > What I want to do is add a series of nested IFs to both parts of the
    > formula; i.e.
    >
    > (A)=IF($O$64=1,VLOOKUP(G33,SL!$G$9:$AH$33,19)*50%,=IF($O$64=2,VLOOKUP(G33,SL!$G$9:$AH$33,19)*40%,
    > etc, etc
    >
    > (B)IF($O$71=1,VLOOKUP(G33,SL!$G$9:$AH$33,28,if(IF($O$71=2,VLOOKUP(G33,SL!$G$9:$AH$33,28,
    > etc, etc.
    >
    > (C) = (A)+(B)
    >
    > Please help. I'll be forever in your debt!
    >
    >
    > James
    >
    >




+ 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