+ Reply to Thread
Results 1 to 7 of 7

Displaying a column from table2 based on a filter in table1

  1. #1
    Registered User
    Join Date
    11-05-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Displaying a column from table2 based on a filter in table1

    Hello,

    I have two sheets of keyword data for consecutive months. Sheet1 is filtered by “ColumnA>5” and I want to recall rows from ColumnC in Sheet2 which corresponds to ColumnB in the unhidden Sheet1 rows.

    Is there a function which can lookup data based on a condition like this?

    Thanks

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Displaying a column from table2 based on a filter in table1

    Try this - in a free column of sheet1, use this formula (assuming your first data cell is in row 2)

    =IF(A2>5,VLOOKUP(B2,Sheet2!B:C,2,False),"")
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    11-05-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Re: Displaying a column from table2 based on a filter in table1

    Hi Bernie, thanks for the response

    I tried the formula and it returned #REF. By moving the values to the leftmost column I managed to look them up but they are showing in the order that they are in sheet 2 rather than the ones that correspond to the names in sheet1. I want to compare two values from different time periods against the same name.

    See attached for a diagram of what I'm trying to do. Neither of the columns are the leftmost column in the table.
    Attached Images Attached Images
    Last edited by FVMLABOLG; 11-06-2015 at 07:09 AM.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Displaying a column from table2 based on a filter in table1

    Try this...

    =INDEX(Sheet2!Y:Y,MATCH(F3,Sheet2!F:F,0))

    Copy down
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    11-05-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    3

    Re: Displaying a column from table2 based on a filter in table1

    That worked! Thanks

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,944

    Re: Displaying a column from table2 based on a filter in table1

    =INDEX(Sheet2!Y:Y,MATCH(F3,Sheet2!F:F,0))

    is the same as

    =VLOOKUP(F3,Sheet2!F:Y,20,False)

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Displaying a column from table2 based on a filter in table1

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. Copy TABLE1 ROW from one sheet to TABLE2 LAST ROW in another sheet
    By jigneshwaghela07 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-02-2014, 08:51 AM
  2. Copy TABLE1 ROW from one sheet to TABLE2 LAST ROW in another sheet
    By jigneshwaghela07 in forum Hello..Introduce yourself
    Replies: 0
    Last Post: 06-01-2014, 12:56 PM
  3. Replies: 4
    Last Post: 05-07-2014, 03:32 AM
  4. Replies: 1
    Last Post: 01-30-2014, 01:42 PM
  5. Replies: 9
    Last Post: 01-04-2013, 09:56 AM
  6. How to copy Table2 columns in to Table1 ?
    By bsaimsc in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2012, 07:13 AM
  7. Replies: 1
    Last Post: 07-21-2011, 09:50 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