+ Reply to Thread
Results 1 to 4 of 4

Vlookup with multiple IF statements

  1. #1
    Registered User
    Join Date
    11-01-2016
    Location
    Minnesota
    MS-Off Ver
    Excel 2013
    Posts
    7

    Vlookup with multiple IF statements

    Hello,

    I'm using a vlookup and would like to return a message in the cell based on what number the vlookup returns. I've started one where if 4 is in the cell it returns "blocked". Example:

    =IF(VLOOKUP([@[PART NUMBER]],Table_Query_from_DATA[#All],4,FALSE)=4,"blocked") This formula works.

    However, I'd like to add the following formulas into the one above so that I can return different values based on numbers zero through 8.

    =IF(VLOOKUP([@[PART NUMBER]],Table_Query_from_DATA[#All],4,FALSE)=0,"")
    =IF(VLOOKUP([@[PART NUMBER]],Table_Query_from_DATA[#All],4,FALSE)=1,"no shipments")
    =IF(VLOOKUP([@[PART NUMBER]],Table_Query_from_DATA[#All],4,FALSE)=2,"no receipts")
    etc.

    Any advice? Thank you

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,253

    Re: Vlookup with multiple IF statements

    Use a table with your output text e.g A1:A9

    Message 0
    "No shipments"
    "No receipts"
    Message 3
    Message 4
    Message 5
    Message 6
    Message 7
    Message 8


    =IFERROR(INDEX(A1:A9,"vlookup formula.")+1,"")

    i.e.

    =IFERROR(INDEX(A1:A9,VLOOKUP([@[PART NUMBER]],Table_Query_from_DATA[#All],4,FALSE)+1,"")

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,618

    Re: Vlookup with multiple IF statements

    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    11-01-2016
    Location
    Minnesota
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Vlookup with multiple IF statements

    Thank you protonLeah, this worked perfectly. I've never used CHOOSE before.

+ 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. Multiple IF statements with VLOOKUP
    By Barry L in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 11-11-2015, 09:21 PM
  2. [SOLVED] Problems connecting multiple If and VLOOKUP statements
    By thomas.lyons in forum Excel General
    Replies: 11
    Last Post: 12-30-2014, 02:02 PM
  3. Replies: 3
    Last Post: 07-25-2013, 08:25 AM
  4. Replies: 7
    Last Post: 11-13-2012, 11:46 AM
  5. Replies: 3
    Last Post: 09-08-2011, 02:40 AM
  6. Using vlookup and if/then statements for multiple tables
    By HP RodNuclear in forum Excel General
    Replies: 9
    Last Post: 04-06-2011, 05:15 PM
  7. [SOLVED] if statements depending on multiple VLOOKUP functions
    By njuneardave in forum Excel General
    Replies: 1
    Last Post: 06-21-2006, 11:40 AM

Tags for this Thread

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