+ Reply to Thread
Results 1 to 4 of 4

VLOOKUP with two variables

  1. #1
    Registered User
    Join Date
    05-13-2017
    Location
    Bozeman, Montana
    MS-Off Ver
    2016
    Posts
    14

    VLOOKUP with two variables

    Hey all, I am working on an inventory sheet which thankfully is getting close to completion. However, I am having trouble creating a lookup. I have a master inventory workbook that I am using VLOOKUP to pull data from. However, I want to be able to use two different criteria to search for it. For example, a item will have a serial number (or NSN as I have it listed) but will also have a name. I have the ability to search for an item by NSN and auto fill the name, but I need my spreadsheet to also do the reverse. I need to be able to plug in the name and have it autofill the NSN, or plug in the NSN and have it auto fill the name. Right now I only have the latter of these. I will attach a copy of the Masterlist Workbook and the Inventory Test Book to play around with if that helps.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: VLOOKUP with two variables

    A cell can have a value or a formula but not both.

    You'd need a worksheet change event handler in VBA to cope with the scenario you describe.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,340

    Re: VLOOKUP with two variables

    generically you could try

    Please Login or Register  to view this content.
    if this is done elsewhere on the sheet.

    but I see from TMS comment maybe you want the circular logic of having the actual values update.. of course that needs vba.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  4. #4
    Registered User
    Join Date
    05-13-2017
    Location
    Bozeman, Montana
    MS-Off Ver
    2016
    Posts
    14

    Re: VLOOKUP with two variables

    Thanks for the help y'all, I suspected that I would have to use VBA, but I wanted to avoid it if possible, because I am brand new to excel in general.

+ 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. [SOLVED] VBA Vlookup using variables
    By forrestgump1980 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-16-2016, 04:48 PM
  2. [SOLVED] vlookup with a few variables
    By kafarrell in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-28-2016, 04:01 PM
  3. [SOLVED] vlookup with variables
    By vio.coman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-04-2015, 09:26 AM
  4. Vlookup with 2 variables
    By Armitage2k in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-21-2014, 03:13 AM
  5. [SOLVED] vlookup with 3 different variables
    By a2424 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2014, 01:51 AM
  6. [SOLVED] Vlookup two variables
    By PERE in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-28-2013, 06:36 AM
  7. [SOLVED] Can I identify variables using VLOOKUP, and then pass variable to another VLOOKUP?
    By Jeff C in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-05-2012, 05:54 PM

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