+ Reply to Thread
Results 1 to 10 of 10

Identifying and merging matching ID's within range automatically

  1. #1
    Registered User
    Join Date
    10-17-2018
    Location
    Plymouth
    MS-Off Ver
    Excel 2021
    Posts
    96

    Identifying and merging matching ID's within range automatically

    Hi.

    I recently discovered =TEXTSPLIT which has been really useful for extracting Activity ID's and their relationships in the scheduling software I use.
    Now I need to filter out the irrelevant relationships and return that information into a usable format.

    You can see a component of this in the attachment.

    My goal is to filter out the noise from Columns C-P and only return ID's that are also Activity ID's In Column B

    Sheet Info

    C-P have alternating purposes
    Column C Pre1 has the predecessor Activity ID to what appears in Column B
    Column D PreR1 contains its respective relationship, and so on.

    I would like to transfer the relevant data automatically to the table below and merge the Activity ID and relationship.
    I understand the merging part may require a helper column and that bit is easy enough
    Returning info that matches ColB within the range Columns C-P is escaping me though.

    Any assistance will be happily received.

    In the attachment you will see the end goal.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,946

    Re: Identifying and merging matching ID's within range automatically

    If the second table is your expected results, I don't understand the logic. Please give some worked examples to explain your rationale.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    10-17-2018
    Location
    Plymouth
    MS-Off Ver
    Excel 2021
    Posts
    96

    Re: Identifying and merging matching ID's within range automatically

    Quote Originally Posted by TMS View Post
    If the second table is your expected results, I don't understand the logic. Please give some worked examples to explain your rationale.
    You will see in the updated attachment how the Coloured Activity Ids (Blue, Green and Pink) in the relationships columns (C-P) are also present in the main Activity ID Start Column (B).
    This is because they share relationships. All the other Activity ID's in the relationship columns are surplus to requirement.
    Effectively this is a data cleaning tool.

    Any Activity ID within Col C-P that isn't also present in column B needs to be removed automatically with the cleaned results put into the second table

    I can add more worked examples but it will just provide more noise without adding anything. I am hoping that the colouring, together with the expected results and the further details provided here will assist.

    Effectively the second data table is just a trimmed version of the top table (the top table being results of a TEXTSPLIT formula). The concept is simple though my explanation may be lacking. I am not sure I can explain it any other way.

    My initial thoughts were some INDEX, MATCH, FILTER
    or
    COUNTIF FILTER to scrub the data, removing all the grey activities in col C - P eg A451700 FF

    Essentially I need an ARRAY Filter based on a fixed column B lookup value (nothing in the RED Relationships section should move from its respective Row in the lower "trim" table)

    Followed buy TEXTJOIN to recombine the remaining ID's (for example bringing ENPRE0001 and FF together to make ENPRE0001FF) this can be done separately though.


    Thank you for the time spent looking so far.
    Attached Files Attached Files
    Last edited by aabbey; 05-05-2023 at 07:20 PM.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Identifying and merging matching ID's within range automatically

    maybe something like this with Power Query
    btw. you have duplicated entry in ID column
    Index Activity ID Start List
    1
    ENGSCM00001
    2
    ENGSCM00002
    3
    ENGDET001
    4
    ENGDET002 ENPRE0001FF
    5
    ENGDET003
    6
    ENGDET004 ENGSCM00002FF,ENGDET002FF
    7
    SCPCSR001
    8
    SCPCSR003 ENGSCM00002FF
    9
    SCPCSR002
    10
    SCPCSR004 ENPRE0002FF
    11
    ENGSCM00002
    Last edited by sandy666; 05-05-2023 at 08:26 PM. Reason: update

  5. #5
    Registered User
    Join Date
    10-17-2018
    Location
    Plymouth
    MS-Off Ver
    Excel 2021
    Posts
    96

    Re: Identifying and merging matching ID's within range automatically

    Quote Originally Posted by sandy666 View Post
    maybe something like this with Power Query
    btw. you have duplicated entry in ID column
    Index Activity ID Start List
    1
    ENGSCM00001
    2
    ENGSCM00002
    3
    ENGDET001
    4
    ENGDET002 ENPRE0001FF
    5
    ENGDET003
    6
    ENGDET004 ENGSCM00002FF,ENGDET002FF
    7
    SCPCSR001
    8
    SCPCSR003 ENGSCM00002FF
    9
    SCPCSR002
    10
    SCPCSR004 ENPRE0002FF
    11
    ENGSCM00002

    I think I have identified the cause of confusion (which also highlights the necessity of finding a formula for this issue

    I made an error in the sheet that I shared where I highlighted what I thought was a matching Activity ID but it wasn't.

    I have further detailed the sheet. IDs and relationships that need to be removed have red font

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Identifying and merging matching ID's within range automatically

    1. DON'T QUOTE WHOLE POSTS !
    2. check this one:
    Index Activity ID Start List
    1
    ENGSCM00001
    2
    ENGSCM00002
    3
    ENGDET001
    4
    ENGDET002
    5
    ENGDET003
    6
    ENGDET004 ENGSCM00002FF,ENGDET002FF
    7
    SCPCSR001
    8
    SCPCSR003 ENGSCM00002FF
    9
    SCPCSR002
    10
    SCPCSR004
    11
    ENGSCM00002




    if the problem is solved, make me happy and hit Add Reputation (bottom left corner next to the post that was helpful)
    and then mark the thread as SOLVED (top above your first post - Thread Tools)
    Last edited by sandy666; 05-06-2023 at 06:42 AM.

  7. #7
    Registered User
    Join Date
    10-17-2018
    Location
    Plymouth
    MS-Off Ver
    Excel 2021
    Posts
    96

    Re: Identifying and merging matching ID's within range automatically

    Can it be done without query?

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Identifying and merging matching ID's within range automatically

    maybe, I don't know

  9. #9
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,976

    Re: Identifying and merging matching ID's within range automatically

    C18
    =TEXTJOIN("",TRUE,IF(COUNTIF($B$3:$B$13,C3:P3)+IF(B3:O3=B3,0,COUNTIF($B$3:$B$13,B3:O3))>0,C3:P3&IF(LEN(C3:P3)=2,",",""),""))

    copied down.
    Attached Files Attached Files

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

    Re: Identifying and merging matching ID's within range automatically

    As per your message to me, please do NOT open a new thread on this - simply continue here. 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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    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. Identifying matching cells between two sheets
    By Bea98 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2020, 04:45 AM
  2. Replies: 5
    Last Post: 01-31-2014, 09:59 AM
  3. Replies: 5
    Last Post: 01-31-2013, 10:50 AM
  4. Identifying matching Blackout date periods
    By TACAMO in forum Excel General
    Replies: 0
    Last Post: 01-31-2012, 06:45 PM
  5. Matching, identifying, and updating worksheets
    By artemis_f0wl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2009, 12:58 PM
  6. Identifying & Merging Duplicate Rows within a Range
    By wadsy in forum Excel General
    Replies: 4
    Last Post: 10-01-2008, 05:06 AM
  7. [SOLVED] identifying and moving matching values
    By sean_f in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2006, 01:25 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