+ Reply to Thread
Results 1 to 6 of 6

Creating table that conditionally retrieves data in another sheet

  1. #1
    Registered User
    Join Date
    07-12-2016
    Location
    CA
    MS-Off Ver
    Excel 2013
    Posts
    3

    Creating table that conditionally retrieves data in another sheet

    So here's what I'm trying to achieve: I have a table with info like so:
    excel1.png

    And what I want to do is, on a separate worksheet, automatically grab all row names with "TEST" in them and certain corresponding properties to make a new table:

    excel2.png

    Which ideally has some newly calculated cells in-between such properties.

    What is the best way for me to go about this?
    Attached Files Attached Files
    Last edited by zebra2; 07-12-2016 at 07:02 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Creating table that conditionally retrieves data in another sheet

    As this is your first post, you may not know that many contributors are not able to view .png files on this forum due to software incompatibilities with some browsers. It is better to attach an Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Pete

  3. #3
    Registered User
    Join Date
    07-12-2016
    Location
    CA
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Creating table that conditionally retrieves data in another sheet

    Thanks for the tip, I've attached the sample workbook here, with the desired outcome on the second sheet, given the first sheet table.
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Creating table that conditionally retrieves data in another sheet

    Put this formula in I2 of Sheet1:

    =IF(ISNUMBER(SEARCH("TEST",B2)),MAX(I$1:I1)+1,"-")

    then copy down to beyond your data in order to accommodate more data being added - the hyphens indicate where the formula is active.

    Then in A2 of the other sheet you can use this formula:

    =IFERROR(INDEX(Sheet1!$A:$G,MATCH(ROWS($1:1),Sheet1!$I:$I,0),MATCH(A$1,Sheet1!$A$1:$G$1,0)),"")

    You can copy this across (omitting column D), and then copy those formulae down as far as you think you may need them.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    07-12-2016
    Location
    CA
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Creating table that conditionally retrieves data in another sheet

    Thank you for the help. I can see the function of the first formula, but the second isn't generating any output for me. Are all the cells it refers to meant to be from Sheet1?

    Edit: I changed the reference A$1 to sheet1 and now the program works as anticipated.

    Excellent!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Creating table that conditionally retrieves data in another sheet

    Yes, you need to ensure that the headings in row 1 of Sheet2 are exactly the same as in Sheet1 (which they were in your sample file). Sorry, I forgot to point that out.

    Glad to hear that you got it working.

    Pete

+ 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. Make conditionally sized dynamic table (data table)
    By myersac in forum Excel General
    Replies: 0
    Last Post: 09-17-2014, 03:23 PM
  2. Creating Hyperlinks that will Filter Data on the Sheet/Table linked.
    By Velesath in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2014, 09:20 AM
  3. Retrieves lines of a table thanks to the date
    By vadius in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-17-2014, 01:11 PM
  4. how to save a data into table from a invoice creating sheet
    By Madhur jain in forum Excel General
    Replies: 0
    Last Post: 01-28-2013, 02:55 AM
  5. Search Box that searches and retrieves data from another sheet
    By tommib in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2009, 01:26 PM
  6. Formula retrieves wrong data
    By Newmoon in forum Excel General
    Replies: 2
    Last Post: 08-11-2005, 11:02 AM
  7. [SOLVED] Looking up data from a table conditionally
    By Eric Stephens in forum Excel General
    Replies: 2
    Last Post: 04-15-2005, 12:06 PM

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