+ Reply to Thread
Results 1 to 4 of 4

Create new table with data extracted from another table

  1. #1
    Registered User
    Join Date
    08-11-2019
    Location
    USA
    MS-Off Ver
    365
    Posts
    43

    Create new table with data extracted from another table

    Hello, I have a table that I'm trying to extract from it data and copy to a new table in the same sheet, based on text value. I've attached a sample. Thanks in advance for any help.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this ‼


    According to your attachment a beginner starter you must first paste to the Sheet1 worksheet module
    then this event raises when you modify the cell I3 just with exactly the same color than in the source range :

    PHP Code: 
    Private Sub Worksheet_Change(ByVal Target As Range)
                
    Dim L&, R&, J$
        If 
    Target.Address "$I$3" Then
               Application
    .EnableEvents False
               Target
    .CurrentRegion.Offset(1).Clear
            
    If Target "" Then
                    L 
    3
                
    For 2 To [A1].CurrentRegion.Rows.Count
                    J 
    Join(Filter(Evaluate("IF($B$" ":$E$" "=$I$3,$B$1:$E$1)"), FalseFalse), ", ")
                    If 
    "" Then L 1Rows(L).Columns("H:I") = Array(Cells(R1), J)
                
    Next
            End 
    If
                
    Application.EnableEvents True
        End 
    If
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 02-25-2020 at 09:43 AM. Reason: optimization …

  3. #3
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Create new table with data extracted from another table

    Check my solution.
    Please Login or Register  to view this content.
    Best Regards,
    Maras.

  4. #4
    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,916

    Re: Create new table with data extracted from another table

    This is very easy with PowerQuery in Excel 365.

    M Code:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    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] A report to show data extracted from table with time stamp
    By Shamz41 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-22-2018, 07:38 PM
  2. [SOLVED] extracted data from a table and grouped them into pairs would like to know how often they
    By khanaran in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2017, 05:52 AM
  3. Dynamic chart of counted data extracted from pivot table
    By ffbulle in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-19-2016, 04:25 PM
  4. How to set or change formats of the data extracted from Pivot table
    By divi123 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-09-2015, 08:40 AM
  5. How to set or change formats of the data extracted from Pivot table
    By divi123 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-06-2015, 02:12 AM
  6. Replies: 0
    Last Post: 02-21-2013, 09:07 AM
  7. Replies: 0
    Last Post: 04-20-2010, 01:34 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