+ Reply to Thread
Results 1 to 13 of 13

matching based on first three, last items for the similar items and put into adjacent cell

  1. #1
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 insider(Windows 10 64-bit)
    Posts
    803

    matching based on first three, last items for the similar items and put into adjacent cell

    Hi experts
    I hope what I ask for it the Excel can deal with it , despite of it's complicated .so I want matching the items in column B for sheet DATA with column B for sheet REP1 . the problem is very similar for the items with simple differnces . I no know if my standard is acceptable . I want when match the items based on sheet DATA should depend on the first three & last items( because will show in another sheet REP1 with simple differences like space or add another item or the size of letter , then should ignore theses differnces)
    for instance
    in sheet DATA the item =BS 1200R20 18PR G580 TCF JAP
    and the same item =BS 1200R20 G580 TCF JAP in sheet REP1
    but becarful when search the items in sheet REP is not necessary could be in the same location into cell as in sheet DATA .the most important should be matched based on first three, last items for the similar item for sheet DATA
    so when search based on first three, last items for the similar item for sheet DATA will take theses BS 1200R20 G580 JAP then should be matched and put BS 1200R20 18PR G580 TCF into adjacent cell BS 1200R20 G580 JAP as I put the result in sheet master. also should merge the values for column C & D and add column BALANCE to subtract column C from column D and highlighted the items are simple differences .
    should show the whole items for two sheets even if the item is available in sheet but not is vailable in another .
    I put a little result in sheet MASTER to understand it
    last thing if the items values are zero for columns C,D for for any sheet no need showing in sheet MASTER
    if what I ask for it is impossible . all of my ears to any suggestion .
    thanks
    Attached Files Attached Files
    Last edited by abdo meghari; 07-16-2022 at 06:58 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,840

    Re: matching based on first three, last items for the similar items and put into adjacent

    You have numerous posts on this matching issue so you need to address the problem (as I understand it) of why the same product is recoreded under diffrent "codes".
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 insider(Windows 10 64-bit)
    Posts
    803

    Re: matching based on first three, last items for the similar items and put into adjacent

    the problem I have many branches of company . each branch send the file by email will be slight different ethier in spaces or add some items but they are very similar . the employee said me it can't contral and correct based on using codes for each item . this is beacuse of the source of main company where purchse from it . every time will change ,then add codes for each item will be useless .
    I don't make hard the matters & waste time the members . but I need ultimatelty solution for this dilemma
    any idea you have ?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,840

    Re: matching based on first three, last items for the similar items and put into adjacent

    Take this example:

    BS 385/65R22.5 R164 THI vs BS 385/65 R22.5 18PR TCF R164 THI

    1. Can we match initially on the first TWO fields as highlighted in BOLD?
    2. If the above match is found,
    3. Check whole codes (in DATA/REP1) to find EXACT match. e,g BS 315/80R22.5 R184 JAP vs BS 315/80R22.5 R184 JAP
    4. If 3. fails, then which of the fields in RED need to be checked to ensure the correct match- last field only ("TUI") or last TWO ("RI64 TUI") if there are 2 (or more) fields?

  5. #5
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 insider(Windows 10 64-bit)
    Posts
    803

    Re: matching based on first three, last items for the similar items and put into adjacent

    1. Can we match initially on the first TWO fields as highlighted in BOLD?
    I'm not sure if I understand you
    does mean just BS 385/65R22.5 without the last item THI ?
    if it's so I don't think to correctly showing the item .
    for more detailes always the two first and the last item are common with the others items in another sheet . always repeat the first two items when match but the specific standard is the last item for many items .
    3. Check whole codes (in DATA/REP1) to find EXACT match. e,g BS 315/80R22.5 R184 JAP vs BS 315/80R22.5 R184 JAP
    when find the same thing without any differnces also should put in djacent cells .
    If 3. fails, then which of the fields in RED need to be checked to ensure the correct match- last field only ("TUI") or last TWO ("RI64 TUI") if there are 2 (or more) fields?
    should be the last field .
    Last edited by abdo meghari; 07-16-2022 at 06:25 AM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,840

    Re: matching based on first three, last items for the similar items and put into adjacent

    What is required (and you know this) is a "Data clean" routine which recognises (or tries to!) the incorrect data.

    Example

    BS 205/70R15C R623 THI vs BS 205/70 R15C R623 THI i.e a missing blank in the first.

    So you need a single source (with you ?) of all (correct) codes and a macro which will run against the data received (manually input from e_mails ?) and hopefully correct all errors.
    Last edited by JohnTopley; 07-16-2022 at 12:56 PM.

  7. #7
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 insider(Windows 10 64-bit)
    Posts
    803

    Re: matching based on first three, last items for the similar items and put into adjacent

    I edited file. also I would add some detailes if there is new item is existed in one of the sheet but not in another how should be showing .see two last row in sheet master .
    I hope this help . just tell me if need any thing
    thanks
    Last edited by abdo meghari; 07-16-2022 at 07:02 PM.

  8. #8
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 insider(Windows 10 64-bit)
    Posts
    803

    Re: matching based on first three, last items for the similar items and put into adjacent

    I hope to see the edited file if there somthings should clean .

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,960

    Re: matching based on first three, last items for the similar items and put into adjacent

    Perhaps this will be of some help.
    1. Select cells B2:B84 on the Rep1 sheet.
    2. Utilize the Text to Columns feature selecting > Delimited > Space
    3. Set the destination to E2 before selecting Finish
    4. Paste the following into cell K2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    5. For Input use: =SUM(SUMIFS(C$2:C$84,B$2:B$84,B2),SUMIFS(DATA!C$2:C$85,DATA!B$2:B$85,K2))
    6. For Balance use: =SUM(SUMIFS(D$2:D$84,B$2:B$84,B2),SUMIFS(DATA!D$2:D$85,DATA!B$2:B$85,K2))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  10. #10
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 insider(Windows 10 64-bit)
    Posts
    803

    Re: matching based on first three, last items for the similar items and put into adjacent

    @JeteMc thanks . can you check some cells contain error #Num?

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,960

    Re: matching based on first three, last items for the similar items and put into adjacent

    I would assume those to be the ones that appear on the Rep1 sheet and have no match on the Data sheet such as BS 215/70R15C R660 TR which was identified on the Master sheet.
    To remove the #NUM! error modify the formula in K2 and down to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To identify the brands listed on the Data sheet but not on the Rep1 sheet:
    1. On the Data sheet populate column E using: =ISERROR(MATCH(B2,'REP1'!K$2:K$84,0))
    2. On the Rep1 sheet starting with cell K86 use: =IFERROR(INDEX(DATA!B$2:B$85,AGGREGATE(15,6,(ROW(DATA!B$2:B$85)-ROW(DATA!B$1))/(DATA!E$2:E$85=TRUE),ROWS(K$86:K86))),"")
    Let us know if you have any questions.
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 insider(Windows 10 64-bit)
    Posts
    803

    Re: matching based on first three, last items for the similar items and put into adjacent

    thanks very much

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,960

    Re: matching based on first three, last items for the similar items and put into adjacent

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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] add items into specific location for adjacent cells based on helper columns for two sheets
    By tubrak in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-28-2022, 01:14 PM
  2. [SOLVED] mark color for not matched items for adjacent cells based on another adjacent cells
    By tubrak in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-14-2022, 08:02 AM
  3. insert row for new items before TOTAL row based on matching between two sheet
    By Mussa-A in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2021, 10:20 PM
  4. [SOLVED] Filter Data Based on Unique Column Items and Save the Workbook with Filtered Items
    By IonutC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2019, 03:08 AM
  5. Counting unique items on a list based on date in adjacent column
    By Mafoo17 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2013, 04:24 PM
  6. [SOLVED] VBA copies rows based on specific items in a column but need to rename items created
    By djfscouse in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2013, 11:38 PM
  7. Populate Cell Based on Matching Items
    By d0518mills in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2011, 05:23 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