+ Reply to Thread
Results 1 to 5 of 5

Vlookup with if statement

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    161

    Vlookup with if statement

    =IF('Quote Info'!B26="n",VLOOKUP('Quote Info'!C19,[Mtlspecs.XLS]Material!$A$9:$S$159,5,VLOOKUP('Quote Info'!C19,Mtlspecs.XLS!TUB,3)))


    Can anyone look at this formula and see why it is not working correctly. I can upload files if that is going to be needed.

    I am 100% positive there is a n in the B26 cell of the IF Statement.

    Problem:
    the formula is going all the way to the last VLOOKUP STATEMENT. If i understand correctly it should stop at the first VLOOKUP ( True) because the if statement is true ,
    there is without a doubt an n in B26.

    i am assuming it is syntax issue but for the life of me i can't get it right.

    Thanks
    Last edited by Traymond; 11-24-2010 at 02:10 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vlookup with if statement

    Hi,

    I think you'll need to upload the wb so that we can see the formula in context. Are you sure B26 doesn't have say "n ", i,e, with a trailing space?

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    161

    Re: Vlookup with if statement

    Here you go.

    with the current data F12 on start sheet should be 0.190 instead of #NA
    Attached Files Attached Files

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

    Re: Vlookup with if statement

    Maybe

    =IF('Quote Info'!B26="n",VLOOKUP('Quote Info'!C19,[Mtlspecs.XLS]Material!$A$9:$S$159,5,0),VLOOKUP('Quote Info'!C19,[Mtlspecs.XLS]TUBING!,3,0))
    Last edited by NBVC; 11-24-2010 at 02:05 PM.
    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.

  5. #5
    Forum Contributor
    Join Date
    04-18-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    161

    Re: Vlookup with if statement

    Bingo !!! That was it, closed parens and needed the false part of the VLOOKUP. learned a valuable lesson on that one. thanks so much for the fix.
    Last edited by Traymond; 11-24-2010 at 02:18 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