+ Reply to Thread
Results 1 to 7 of 7

Populating a table based on the value match from another table

  1. #1
    Registered User
    Join Date
    08-30-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Populating a table based on the value match from another table

    I believe that the solution to this will be insultingly obvious, but since I'm only an occasional Excel user and not a native English speaker, I'm having a trouble formulating a Google query that would yield any satisfying answers.

    Suppose I have the following table, let's call it Table 1:
    Please Login or Register  to view this content.
    What I would like to achieve is a Table 2 of the following form (populated with the data from Table 1, basing on the "Include" value):
    Please Login or Register  to view this content.
    A straightforward solution would be to use a pivot table based on the data from Table 1 (with an appropriate filter), but my requirement is that the Table 2 would automatically update after each change in Include column in Table 1, and all the supposed workarounds for pivot table auto-refresh are giving me headache.

    Many thanks for your help!
    Last edited by wnarx; 08-31-2012 at 12:31 AM.

  2. #2
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Populating a table based on the value match from another table

    Hi wnarx and welcome to the forum. Is a VBA solution okay?

  3. #3
    Registered User
    Join Date
    08-30-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating a table based on the value match from another table

    Quote Originally Posted by day92 View Post
    Hi wnarx and welcome to the forum. Is a VBA solution okay?
    Hi and thanks for the welcome. If there's no easy way to achieve this with formulas only, I'm OK with VBA as well.

  4. #4
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Populating a table based on the value match from another table

    Give this a try..

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-30-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating a table based on the value match from another table

    Thanks for your suggestion, but I'm afraid that's not at all what I was looking for (unless I'm missing something, which may be very well possible).

    If I understand correctly, your code is for a one-off macro which simply deletes all the rows containing "No" in the C column.

    Perhaps the description in my original post wasn't clear enough, which I have to blame again on my poor command of English, and for which I'm sorry.

    What I am trying to achieve is to have two columns side by side. The first one is longer and contains items marked with either "Yes" or "No"; the second table contains only "filtered" data (marked with "Yes" in the first table), and updates automatically after each change in the first table.

    Thanks for any further advice.

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Populating a table based on the value match from another table

    In E2: =IFERROR(INDEX(Table1[Name],MATCH(0,IF(Table1[Include]="Yes",COUNTIF(E$1:E1,Table1[Name])),0)),"")

    In F2: =IF(E2="","",VLOOKUP(E2,Table1[[Name]:[Category]],2,0))
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-30-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating a table based on the value match from another table

    Teethless mama, this is amazing! It works like a charm. Many thanks!

+ 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