+ Reply to Thread
Results 1 to 2 of 2

VBA VLookUp 1 condition return in 1 cell multiple results.

  1. #1
    Registered User
    Join Date
    07-27-2015
    Location
    Calexico,CA
    MS-Off Ver
    MS Office 2010
    Posts
    1

    Question VBA VLookUp 1 condition return in 1 cell multiple results.

    Hello everyone,

    I'm new to the VBA programming in Excel I have already try some numerous attempts but they take too long or they don't work at all.

    I have included on this post 4 attachments:
    - MainFile
    - Weekly Kronoz
    - Weekly Quartz
    - Weekly Quartz-2017

    In the Main File I'm using VLookUP to Look for the BK# and Retrieve the Dates for ATD and ATA as well as the Container Numbers in other Workbooks.

    This work good so far the main problem is when it comes down to Container # since a BK# may have more than 1 Container #.

    What I'm trying to do is a VBA Code to look for the BK # in all the different Workbooks and return all the Containers # available for that Bk# in a single Cell.

    Lets say for Example if you open the MainFile I have B# 37607 and it currently has the Container # UACU5115709 which is okay since its only 1 container but lets say that B#37607 has more than one. Well I need the VBA code to return all Container # for that B# like UACU5115709, FSCU8825999, etc.

    I would appreciate any help provided.

    Thanks
    Attached Files Attached Files
    Last edited by SistemasCalexico; 02-01-2017 at 06:33 PM. Reason: Change Worksheet to Workbook

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: VBA VLookUp 1 condition return in 1 cell multiple results.

    Hello SistemasCalexico,

    Welcome to the Forum!

    There is a lot of different issues with these layouts. While the macro works with the examples provided, there may be issues with other workbooks. I have added a new worksheet to the Main workbook which will list the booking numbers and the containers associated with them. Only booking numbers that have shipping container numbers in BIC format are copied to the list.

    Here is the macro that has been added to the attached workbook. You can run the macro using Alt+F8 to bring up the macro dialog.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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] Return multiple Results from an IF statement if more than one condition exists
    By mysticmoron109 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-28-2015, 02:45 PM
  2. Help using vlookup to return multiple results for one vlookup value
    By Akmon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-27-2015, 06:00 AM
  3. How VLOOKUP can return multiple results
    By BOB202 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-07-2013, 03:50 PM
  4. Vlookup (or something!) to return multiple results?
    By Madraykin in forum Excel General
    Replies: 3
    Last Post: 04-24-2012, 11:30 AM
  5. Vlookup to return multiple results?
    By cdotyii in forum Excel General
    Replies: 8
    Last Post: 09-05-2011, 10:23 AM
  6. Replies: 3
    Last Post: 01-24-2007, 05:38 AM
  7. [SOLVED] how to return multiple results in vlookup?
    By Landa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-20-2006, 03:35 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