+ Reply to Thread
Results 1 to 5 of 5

Grab from one table and insert into another minus empty fields

  1. #1
    Registered User
    Join Date
    09-08-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2013
    Posts
    68

    Grab from one table and insert into another minus empty fields

    Need help from the pros!

    Attached is a draft smaller scale copy of what I'm trying to accomplish. Basically I have a mass field that has names in one column with an associated mission number in a second column. Not all rows will contain a name or mission number but the format must stay intact (not filter/sort). There is more to the actual spreadsheet than just the example.

    In another section on the spreadsheet a mini "window" will show what names have been entered along with the mission numbers.

    My question is, how do I capture the names and msn numbers in say cells B2:C25 and then display them in cells G12:H20 omitting all empty entries?

    Thanks in advance!
    Attached Files Attached Files
    Last edited by purdue7997; 10-26-2010 at 11:10 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Grab from one table and insert into another minus empty fields

    Put this in H12 and copy down:

    =IF(G12="", "", VLOOKUP(G12, B:C, 2, 0))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-08-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Grab from one table and insert into another minus empty fields

    Quote Originally Posted by JBeaucaire View Post
    Put this in H12 and copy down:

    =IF(G12="", "", VLOOKUP(G12, B:C, 2, 0))
    I would need cells G12:G20 to auto fill in as well though. Cells G12:H20 will auto create whatever is inside cells B2:C25, omitting any empty cells.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Grab from one table and insert into another minus empty fields

    The inclusion of a "key" column next to your data creates a quickly matchable index that can be used to create your smaller table in realtime. Like shown.

    This allows the sheet to function without the need of macros, and the key columns can be hidden if desired.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-08-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Grab from one table and insert into another minus empty fields

    Quote Originally Posted by JBeaucaire View Post
    The inclusion of a "key" column next to your data creates a quickly matchable index that can be used to create your smaller table in realtime. Like shown.

    This allows the sheet to function without the need of macros, and the key columns can be hidden if desired.
    Pure genius! Thanks JBeaucaire! Thread solved and Rep given!

+ 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