+ Reply to Thread
Results 1 to 10 of 10

Extract data from a table into separate column

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Extract data from a table into separate column

    I am trying to extract and list data from a range if a string is found in an adjacent column. A sample workbook is attached.

    Any help much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-30-2003
    Location
    Singapore
    MS-Off Ver
    Excel 2019
    Posts
    197

    Re: Extract data from a table into separate column

    In H30, copied across and down :

    =IFERROR(INDEX($H$7:$H$25,AGGREGATE(15,6,ROW($H$7:$H$25)-ROW($H$6)/ISNUMBER(FIND(L$29,TEXT($E$7:$E$25,"mm-dd-yy"))),ROWS($1:1))),"")

    Regards
    Bosco

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Extract data from a table into separate column

    If Bosco's suggestion is not giving the results thagt you require, then a more detailed explaination of your expected results will be needed.
    Bosco's formula will not return the same results as you provided, but it returns those that your explaination implies (with the discrepancies being under the '7' column heading in row 29).

    It could be caused by a formatting issue based on regional settings, when I open your sample file, E7 defaults to date format dd/mm/yyyy while the rest of column E retains the appearance of a text format, 0-0-#0.

  4. #4
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Extract data from a table into separate column

    Thanks, Jason. You are 100% correct - an unfortunate (or careless) selection of sample numbers by me has generated dates in USA but not in Australia!

    I've clarified (I hope) the solution sought in the workbook attached.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Extract data from a table into separate column

    This looks good with your sample, Bob.

    =IF(H29="","",IFERROR(INDEX($H$7:$H$25,SMALL(IF(ISNUMBER(SEARCH("-"&H$29&"-",$E$7:$E$25)),ROW($E$7:$E$25)-ROW($E$7)+1),ROWS(H$30:H30))),""))

    Array confirmed with Shift Ctrl Enter.

    Or, using Bosco's AGGREGATE method (non-array)

    =IF(H29="","",IFERROR(INDEX($H$7:$H$25,AGGREGATE(15,6,ROW($E$7:$E$25)-ROW($E$7)+1/ISNUMBER(SEARCH("-"&H$29&"-",$E$7:$E$25)),ROWS(H$30:H30))),""))

    Not sure if there are any advantages or disadvantages with either method.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extract data from a table into separate column

    Try this
    Enter in H30 and drag formula across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Or this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Both are regular formulas.
    Last edited by AlKey; 08-05-2018 at 11:26 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  7. #7
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Extract data from a table into separate column

    Please can you tell me what part the '15'and '6' play in the formula as in AGGREGATE(15,6?

    Thanks

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extract data from a table into separate column

    Quote Originally Posted by BRISBANEBOB View Post
    Please can you tell me what part the '15'and '6' play in the formula as in AGGREGATE(15,6?

    Thanks
    AGGREGATE() contains number of different functions: 15 is SMALL() and 6 is to ignore errors.

  9. #9
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Extract data from a table into separate column

    Ah! Something more to learn.

    Thanks - worked perfectly

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,782

    Re: Extract data from a table into separate column

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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] Extract data from tables and populate a separate table?
    By Mirisage in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-20-2017, 03:08 PM
  2. [SOLVED] Extract Information from a column to make a separate table
    By kaleonard08 in forum Excel General
    Replies: 5
    Last Post: 03-21-2016, 02:41 PM
  3. Replies: 2
    Last Post: 05-10-2015, 05:45 PM
  4. Replies: 4
    Last Post: 11-22-2010, 12:57 PM
  5. Extract data from table and paste toappropriate column
    By georgeB in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-01-2006, 05:33 PM
  6. Append data from a column to separate table array
    By miss_q in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-12-2005, 07:01 PM
  7. Replies: 0
    Last Post: 05-03-2005, 11:06 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