+ Reply to Thread
Results 1 to 2 of 2

VBA code to search B column and return A column value

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    Birmimgham
    MS-Off Ver
    2015
    Posts
    78

    VBA code to search B column and return A column value

    I have a sheet with several rows, product numbers in columns A and matching barcodes in B. Using a userform, I would like to input the barcode into a textbox, perform a search and return the product number that has been found into a textbox. I am not sure if i need to use vlookup, match and then offset. Thank's in advance.
    Last edited by San75; 04-04-2019 at 06:38 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: VBA code to search B column and return A column value

    Take a look at INDEX.

    Index has the format INDEX (Range, Row Number, Column Number) - in your case row number can be found with MATCH and column number is 1.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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 search a range in a column and return specific code
    By niksirat2030 in forum Excel General
    Replies: 1
    Last Post: 03-20-2019, 10:13 AM
  2. Replies: 1
    Last Post: 11-13-2013, 04:03 PM
  3. [SOLVED] Search Value of column E if exist return value of column B put result in column P
    By hassan khansa in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-23-2013, 11:39 AM
  4. Replies: 2
    Last Post: 12-14-2012, 11:45 PM
  5. Replies: 3
    Last Post: 07-27-2011, 02:29 PM
  6. Replies: 1
    Last Post: 07-26-2011, 06:48 AM
  7. Replies: 3
    Last Post: 01-10-2006, 06:10 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