+ Reply to Thread
Results 1 to 64 of 64

Match codes from file

  1. #1
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Match codes from file

    Hello everyone,

    I have a file, that we run weekly, to show codes, that when they are running together, we can possibly save time, when certain codes can run with each other, what we call 'Sweeps'.

    We create a new list of codes, each week that we produce against and what I would like to see, is to match the new codes, to see if any of those, can be ran together when checked against the Criteria list.

    Is it possible to view the attached and let me know, what is possible to create.

    Many thanks

    Pugg
    Attached Files Attached Files

  2. #2
    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,647

    Re: Match codes from file

    How would I know if codes can be run together? What sort of output are you expecting?
    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.

  3. #3
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Hi,

    Many thanks the reply.

    The attached file shows Sweeps and the other sheets, is the codes, we upload every week.

    The Weekly codes, need to somehow, lookup the Sweeps sheet and any code that is present to the weekly codes, is to check if they can run alongside each other.

    As an example:
    534199 16SPM from Row 2, can run with 537503 SPM from Row 20, as the Sweep data sheet shows this.

    i hope that makes sense.

    Many thanks

    Pugg

  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,647

    Re: Match codes from file

    In the sample workbook, please mock up 5-10 rows of results wherever and however you want to see them - do this manually. It's all obvious to you, but not to me.

  5. #5
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Sorry for the delay.

    Here is the file, with the Example sheet attached.

    What the Example sheet shows, is when viewing the Sweeps Master data sheet, it will tell you what codes can be ran with each other, to create savings (ie Sweeps).

    I hope that makes sense
    Attached Files Attached Files

  6. #6
    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,647

    Re: Match codes from file

    Which version of Excel are you using?

  7. #7
    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,647

    Re: Match codes from file

    I really don't get this. Explain why the list of matches is so short - what are the criteria for making a match?

    Is this what you are expecting?

    Excel 2016 (Windows) 32 bit
    F
    G
    4
    555933 2SPM SWEEP
    5
    555412 2SPM WASH
    6
    589580 CB SWEEP
    7
    589911 CB SWEEP
    8
    555412 2SPM WASH
    9
    555765 CB SWEEP
    10
    534199 2SPM WASH
    11
    534199 2SPM WASH
    12
    579305 2CB WASH
    13
    579305 2CB WASH
    14
    541584 1PCR SWEEP
    15
    534199 16SPM SWEEP
    16
    534199 2SPM SWEEP
    17
    570177 CB WASH
    18
    537503 SPM WASH
    19
    579305 2CB WASH
    20
    543028 CB WASH
    21
    555412 2SPM SWEEP
    22
    555320 SPM WASH
    23
    585309 1SPM SWEEP
    24
    585309 10SPM WASH
    25
    579305 2CB WASH
    26
    868161 CB SWEEP
    27
    554601 2CBPF SWEEP
    28
    541584 1PCR SWEEP
    29
    554811 2CB SWEEP
    30
    534199 16SPM SWEEP
    31
    537503 SPM WASH
    32
    555412 2SPM SWEEP
    33
    579305 2CB WASH
    34
    555765 CB SWEEP
    35
    534199 16SPM SWEEP
    36
    580606 SPM WASH
    37
    579305 2CB SWEEP
    38
    534199 2SPM SWEEP
    39
    534199 16SPM SWEEP
    40
    555412 2SPM WASH
    41
    554601 2CBPF WASH
    42
    585309 1SPM SWEEP
    43
    585309 10SPM WASH
    44
    589521 CB WASH
    45
    555412 2SPM WASH
    46
    555765 CB SWEEP
    47
    555858 CB WASH
    48
    543028 CB SWEEP
    49
    534199 2SPM SWEEP
    50
    589039 CB WASH
    51
    589911 CB SWEEP
    52
    534199 2SPM SWEEP
    53
    534199 2SPM SWEEP
    54
    585309 1SPM SWEEP
    55
    585309 10SPM WASH
    56
    534199 16SPM SWEEP
    57
    555412 2SPM WASH
    58
    555765 CB SWEEP
    59
    589336 CB WASH
    60
    534199 2SPM SWEEP
    61
    537503 SPM WASH
    62
    585309 10SPM SWEEP
    63
    585309 1SPM WASH
    64
    513475 CB SWEEP
    65
    589411 CB WASH
    66
    523429 CB SWEEP
    67
    589911 CB WASH
    Sheet: Example Sweep
    Last edited by AliGW; 04-04-2021 at 10:20 AM.

  8. #8
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Oh no Sorry for the misunderstanding.

    The Sweeps sheet, is what we have checked and verified over the last 66 Weeks (So this will be our check list), checked and found, certain codes can run with other codes, and be able to apply Sweeps.

    The Weekly sheet, when we create the codes, needs to check against the Master Sweep sheet, to see if any of those can run with each other and place Sweeps, to save us time.

    If, when we create the New week, I would like a program or something that with a click, would check the weekly codes against the Sweeps Master sheet and highlight, those that can run with each other, so all we need to do is to add the Sweeps, instead of digging through alot of data, to see which can match.

    Hope that makes sense

    Many thanks

    Pugg

  9. #9
    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,647

    Re: Match codes from file

    Sorry - you are completely missing the point of my questions.

    The Weekly sheet, when we create the codes, needs to check against the Master Sweep sheet, to see if any of those can run with each other and place Sweeps, to save us time.
    How? You have not explained what you are looking for to determine a match. Unless you tell me how you would do it manually, I can't tell you how to automate it - sorry. If you don't make this clear in your next post, I'm afraid I'm out.

    Which version of Excel are you using?

  10. #10
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Hi,

    im running Excel 365 for MSO (16.01.13801.20240) 32 Bit.

    Ok, when we do it manually, we take all the New Weekly created codes (which are Materials) and we check their colour, smell etc, to see if they can run in parallel with other codes and to create Sweeps.
    Once the checks have been validated with the Teams, we then manually add Sweeps to the codes (I have added one of our Weeks, that show The Weekly codes and which ones, can run with other codes etc).
    To do it manually, takes Hours, so I have over the last 66 Weeks, compiled data from what we have already verified, which codes can run with each other to save time, hence we call Sweeps.
    All I am asking, if there is a way, for when i create the New Week codes, there is a simple way for the weekly codes to sense check the Sweep List codes, to see if any of the weekly codes match.
    Then we will update the Week sheet.

    Im sorry, if I don't come across with the information you require, I don't know, which way to explain but I do value you support.

    Many thanks

    Pugg
    Attached Files Attached Files

  11. #11
    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,647

    Re: Match codes from file

    Please update your forum profile - it's way out-of-date.

    I will have a look at the latest workbook.

  12. #12
    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,647

    Re: Match codes from file

    OK - now we have week 14 data. Is that a before, after or something else?

    You keep talking about checking and matching, but you never tell us what that means in practice. I have NO IDEA what constitutes a match, so I do not understand what you are showing me.

    I'm just about to cook dinner - and I'm getting no closer to understanding what you want to do, so I can't even begin to suggest a solution.

    Really sorry.

  13. #13
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Ok, let me start from scratch, hoping that will help.

    The Week 14 list that shows all the codes we will be running for the week, some of those codes may be able to run with other codes.

    The Mast Code List attached, shows codes, when running with other codes, we can save and create Sweeps.

    Week 14, I need to lookup the Master Code List (or whichever way is practical) and each codes in Week 14, checks if they can run with other codes.
    So if I had from week 14 (534199 16SPM), that code would check the Master code List and see if 534199 16SPM can Sweep into other codes.
    If the Weekly sheet codes not find any Matches, we will place WASH, meaning we cannot Sweep that code into other codes.

    Many thanks

    Pugg
    Attached Files Attached Files

  14. #14
    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,647

    Re: Match codes from file

    OK - so now I think I understand, but your latest workbook contains only the master list, so I'm going to have to use an older workbook to look at this. One step forward, two back ...

  15. #15
    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,647

    Re: Match codes from file

    The attached is done with PowerQuery by loading the two existing tables to connection only, filtering the master list to sweep only, then merging the two to identify sweeps and washes in the weekly list. See if it does what you want.

    If not, then I am afraid I am out of ideas.
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Thank you for the support and work carried out.

    i have attached both, your file that you created through PQ and my file that shows the Master and a Test sheet (that has a list of codes).
    What I need to know now, is how do I run the Test sheet, to search the Master sheet, to see if any of the codes (from the Test sheet), can be ran with Sweeps.

    Your PQ file does not show, which codes run with Sweeps to the next code that will be a WASH.

    Please let me know, if there is any other way, I can explain, how it needs to be solved.

    Pugg
    Attached Files Attached Files

  17. #17
    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,647

    Re: Match codes from file

    No, sorry - I don't get it.

    Let's hope someone else does.

  18. #18
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Oh I'm so sorry, if what I have tried to ask, isnt coming across that well.

    I have added the attached Master Code list, with Wk11 & Wk12, that will show you:

    1) Wk11 & Wk12 before the Sweep saving check
    2) Wk11 & Wk12 after the Sweep check.

    The before Sweep saving check, we have to manually test each code to see if, when running with the next code, we can save by adding a Sweep (if not, then it will be added as a WASH).
    The after Sweep saving check, once agreed, certain codes can be produced and when the next code is to be be made, we can add a sweep (instead of a WASH).

    We have been testing each week manually and for the last 66 weeks, I have compiled data, to show which codes, when being produced before other codes, can be added with a sweep.
    That is what the Master Code list shows.

    All i need now, is the find a way, when creating a Week of codes, then to run a program or a click of a Button, to show what codes when being produced, will be able to have Sweeps added, for the next code.
    if there isn't any codes that can be ran and have Sweep savings, then that or all the codes, will be added with a WASH.

    I hope yourself or any other person on the Forum, can help me with the conundrum.

    Many thanks

    Pugg
    Attached Files Attached Files

  19. #19
    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,647

    Re: Match codes from file

    I've put out a call for help.

  20. #20
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Thank you very much and I do really appreciate all the help and support you have given.

    Pugg

  21. #21
    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,647

    Re: Match codes from file

    And I'm sorry I'm not getting it. The problem is often that you know implicitly what you want, so you are unwittingly missing out crucial information. Something small that either you or I have missed will no doubt be the key. Good luck!

  22. #22
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    All I needed, was to create a Weekly plan with codes, then each code in the Weekly plan, looks up the Master code list, to determine, if that code when ran before another code, can be added with a sweep.
    If that code from the Weekly plan cannot find any other codes (from the Master code list) that they can Sweep into, then a WASH will have to be added.

    i know it is simple for me to know, what is required and I am trying as hard as possible to get this across.
    i wish there was another way of showing you what is needed, to possibly understand.

    Many thanks for your support

  23. #23
    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,647

    Re: Match codes from file

    Sorry it's taken so long and a move from Stockton-on-Tees to Ormesby to try to get me to get it! I really have tried, but I'm still none-the-wiser.

    Remember that today ain't going to be a busy day here, as many of the forum regulars will be taking time out today. You may find that you don't get a response until tomorrow, but fingers crossed one of the others will see this and understand what you want.

  24. #24
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Many thanks and Happy Easter

  25. #25
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Good evening everyone

    I was wondering if anyone else out there, was able to support me, in my quest, to have a solution to help me.

  26. #26
    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,647

    Re: Match codes from file

    I fear the worst - 598 views of the thread (which is massive) but no other offer of help suggests that others are as bemused as I am. Sorry about that.

  27. #27
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    many thanks for the feedback.

    How do you think, I can make it simple for all the read and understand, as you said before, I know what is needed, but probably, it is not generating the correct way

  28. #28
    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,647

    Re: Match codes from file

    I really don't know because I have failed to get my head around the concept. Only you can do that. How about asking a colleague how they'd explain it?

    The explanation you've given so far obviously seems completely clear to you because you are working with it on a daily basis. To me, it seems muddled and therefore impossible to implement.

    The easiest way is to give a simple step-by-step - make each step as simple as possible - ONE aspect of the process.

    For me, it's the concept of SWEEP and WASH that I don't get - you really need to clearly define what these terms really mean, because nobody has any hope of understanding what might constitute a match and what woudn't unless they know what these very specific terms maen. To me, SWEEP is a glove puppet and WASH is a rectangular bay and estuary at the north-west corner of East Anglia.
    Last edited by AliGW; 04-09-2021 at 04:34 AM.

  29. #29
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Ok thx,
    Lucky I didnt add Sutty & Sue to the sections

  30. #30
    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,647

    Re: Match codes from file

    Sooty ...

  31. #31
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Here is what we have:
    Hope this helps a bit

    There will be 2 tabs called “Master code list” tab and “New week code list” tab.

    “New week code list” tab will have 2 buttons called “Retrieve & arrange SWEEP items from master code list” and “Save new sweep items to master code list” which will run possibly be creating a macro etc.

    “Master code list” tab includes product codes from the previous weeks that are marked as SWEEP and WASH.

    Sweep is a detailed name, we use for when we can run one product into another, without adding any additional WASH (so the Teams will use a Brush to SWEEP the Tanks out, saving time)
    A WASH means any products running together, will have to be WASH with solutions the plant have for those products and cannot have a SWEEP.

    When a list of products for a new week is pasted in “New week code list” tab and “Retrieve & arrange SWEEP items from master code list” button is pressed macro will go through all the entries in “New week code list” tab. Whenever macro comes across the code (primary code) in “Master code list” tab, it will check if the code in the row below (secondary code) exists in “New week code list” tab. If secondary code is also in “New week code list” tab, primary code will be marked as SWEEP in “New week code list” tab and the secondary code will be moved below the primary code in “New week code list” tab. In this case both primary code and secondary code will be highlighted to indicate that they were processed.

    Otherwise, the primary code will stay as WASH and won’t be highlighted.

    User can change the remaining codes in “New week code list” tab as SWEEP and move the other items up or down whenever needed after the macro finishes running. Only the items that are not highlighted should be moved around and edited because the highlighted ones are already processed.

    Once user is happy with all the entries in “New week code list” tab and presses “Save new sweep items to master code list” button, macro will go and add the new items that has SWEEP next to it and the item in the row below to the end of “Master code list” tab so that they can be used in the coming weeks.

  32. #32
    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,647

    Re: Match codes from file

    Hang on - buttons? VBA/macros???

    You posted in the wrong forum - I am moving this for you now.

    Unfortunately I can't help with VBA - not my thing. Good luck!

    Sweep is a detailed name, we use for when we can run one product into another, without adding any additional WASH
    What does that actually mean? Define "running one product into another". Is this in the Hadron Collider???
    Last edited by AliGW; 04-09-2021 at 05:55 AM.

  33. #33
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Aww sorry, didn't realize it needed to be in a different forum.

    Definition of 'Running one product into another'

    This means, when we produce one product and then make another product, can the check be placed to see if the product to product can either have a SWEEP, or if not then a WASH has to be added.

  34. #34
    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,647

    Re: Match codes from file

    God, that's confused me even more - it seems to be an ever-decreasing circle that never quite gets to the crux of the matter!

    As you'll see, I've moved this thread for you. Really good luck with this, but I'm out, although I have put out another cry for help on your behalf.

  35. #35
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi there,

    Like AliGW I've had quite a bit of difficulty in understanding exactly what is required, but (based on your post #31) see if the "Test Worksheet" in the attached workbook even begins to address the very first stage of your requirements.

    No macros or buttons are involved - these might be added later if we're moving in the right direction.

    Regards,

    Greg M
    Last edited by Greg M; 04-12-2021 at 01:24 PM. Reason: Updated workbook attached

  36. #36
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi again,

    The "Master Code List" worksheets contains multiple instances of individual Product Codes. What is the significance of this?

    Are you talking about checking all combinations of a specific primary code and the various secondary codes which are listed on the row immediately below all instances of the specific primary code?

    Confusing-er and confusing-er!

    Regards,

    Greg M
    Last edited by Greg M; 04-13-2021 at 05:44 PM. Reason: Minor text correction

  37. #37
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hello,

    I believe this is the right track, you have created.

    The Master code List sheet, that shows multiple instances of the same product.
    This reason is, I created 66 Weeks worth of Data, that shown, individual products, that can Sweep into other products, if this is applied.
    Some products that show Sweep, may show different products, it can Sweep into.

    I do really appreciate the help and if there is anyway I can show you more, on how this should work, please let me know

    Many thanks

    Pugg

  38. #38
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    I have attached your sheet and added one of my weeks to the file (called Wk16).

    You can see, this is what we check weekly, when the products are created, to see if any of them, can Sweep into the next product.
    This (Wk16), we assess, then assign Sweep, if possible to the next or one that it can fit to.
    if once the updated Week, with the Sweep added, I add to the Master Code List file, so it tells you, the products each one can Sweep into.

    hope that helps too

  39. #39
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hello,

    I have attached the updated file.

    If you view Test Sheet, you will see cells I have highlighted Yellow.
    According to the data in Col G, it shows it can SWEEP but
    When you view the Master Code List, 522287 SPM doesn't show up to SWEEP into 554201 CB
    Or 554274 4SPM doesn't show up as a SWEEP into 554201 CB.
    But Col G shows it can SWEEP.

    The cells I have highlighted Green, is correct.
    This shows it has checked col B against the Master Code List file and shows it can SWEEP into the products highlighted in Col C, so Yes, it should show SWEEP

    If any products from Col B (which I will use as the check list (When I paste from the Week we are to use), as this is the list from the Wk16 Update tab.
    Col E should show what is possible Col B to SWEEP into (when it checks the Master Code List), then adds to Col E
    Col G will then check if a SWEEP is possible, based on the findings from the Master Code List.
    If the products in Col B,(when it checks the Master Code List against all the products from Col B) cannot find a SWEEP Match, then it should show WASH

    Many thanks

    Pugg

  40. #40
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi again Pugg,

    Many thanks for your latest posts.

    I'll certainly take a look at them, but things are a bit hectic at this end right now, so it may be a few days before I can post anything here.

    Sorry about the delay.

    Regards,

    Greg M

  41. #41
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    Thanks for your support.

    Pugg

  42. #42
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi again Pugg,

    I'm still somewhat confused, but maybe a little less so than before

    Columns B:G on the "Test Sheet" worksheet in the attached workbook seem to show the Sweep/Wash requirements correctly.

    However, the product shown on row 28 (534199 SPM) is listed on thirteen separate rows of the "Master Code List" worksheet. In columns J:P of the "Test Sheet" worksheet I have tried to use the same approach to deal with these multiple listings - have I understood the requirements correctly? If I have, we can consider what needs to be done regarding updates to the "Master Code List" worksheet, but it's quite possible that I still haven't understood your exact requirements.

    Regards,

    Greg M

  43. #43
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    wow, I can see that is is nearly there, just a few tweaks I think needed.

    I have attached an update sheet, that shows Wk17 as we are currently running this week.
    This is the actual run that we have created and checked in the Lab and then placed the codes to which we deem can have Sweep.
    I have now added those Sweep date from Wk17 to the Master Code List.
    I then added the Codes from Wk17 to the Test sheet., to see how it matches.

    See if they match to what you have created, as I think we are nearly there, but maybe a few more tweaks, to fine tune it, then Im sure, its a Hit.

    I do seriously appreciate all the support and help that you have given

    Many thanks

    Pugg

  44. #44
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    Hope you had a chilled weekend.

    Do you know if you had a view of the update, that I sent you.

    Many thanks

    Pugg

  45. #45
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi Pugg,

    I might have something for you later this afternoon/evening.

    Regards,

    Greg M

  46. #46
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi Pugg,

    Take a look at the "Test Worksheet" sheet in the attached workbook and see if it correctly identifies all of the "SWEEP" situations for Week 17.

    If it does, we can then look at what's involved in copying those data to the "Master Code List" worksheet.

    Use the "Check Products" button to perform the checks. When the "Product by Product" checkbox is ticked the routines perform the checks for a single product and then pause so that the results of those specific checks can be examined.

    Hope we're making progress.

    Regards,

    Greg M

  47. #47
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hello,

    I can see now the improvements made and alot does match to what has been asked.

    I have attached, the copy and highlighted in RED on the Test Sheet, the Product No's that do not match.
    The ones in Black, are exactly as I want them to be.

    For some reason (not sure how), Col I, that should be the Product being able to Sweep into col J from those in RED, do not match and are not showing on the Master Code List, as being able to Sweep into each other.

    it shows from Col I:
    589536 CB should be able to SWEEP into 554601 2CBPF
    It does show though, the reverse (554601 2CBPF can SWEEP into 589536 CB)
    So 554601 2CBPF should be in Col I and 589536 CB should be in Col J

    The work carried out, is amazing and I think a few more tweaks, will get the result asked for.

    I do appreciate, the work carried out.

    Many thanks

    Pugg

  48. #48
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi again Pugg,

    From your Post #31:



    When a list of products for a new week is pasted in "New week code list" tab and "Retrieve & arrange SWEEP items from master code list" button is pressed macro will go through all the entries in "New week code list" tab. Whenever macro comes across the code (primary code) in "Master code list" tab, it will check if the code in the row below (secondary code) exists in "New week code list" tab. If secondary code is also in "New week code list" tab, primary code will be marked as SWEEP in "New week code list" tab . . .

    Based on the results you've corrected, it would appear that the SWEEP/WASH value is taken from the appropriate row of Column B on the "Master Code List". Is this correct?

    The attached version of the workbook shows results based on this.

    Regards,

    Greg M

  49. #49
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    I think you have got it, as checked and all shows correct.

    I added the following future weeks products, to check if all were showing and amazingly, they all shown up and even gave a greater variation, of what we can SWEEP into.

    Amazing work than you.

    Is there any updates, that you need to work on, now it looks the correct way.

    Pugg

  50. #50
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi Pugg,

    Glad to hear that it's starting to look the way it should.

    In order to automate the application any further I need you to take the output from the checks performed, and show me precisely how those values (and any others?) should be added to the Master Code List.

    On a single worksheet, show the values from the "Sweep Summary" table, and show also a mini-table of the additions that should be made to the "Master Code List" worksheet.

    I don't guarantee that I'll do it, but I'll certainly take a look.

    Regards,

    Greg M

  51. #51
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    I think as it shows in previous comments, I created the SWEEP from the files, we already agreed we can SWEEP into other products.
    This data spanned from beginning of 2020 to date (Actually Wk16).
    So the Master Code List shows all the permutations that we can SWEEP into, so far.

    The "Sweep Summary" table, every time I add a different Week of products to Col B and the file runs to show what products can SWEEP into each other, I will update that information to the Product Plan.
    Any products that the Master Code List doesn't show as a SWEEP, will be verified by the Quality Team to assess, if products (that do not show up), can create a SWEEP.
    If any products are found, able to SWEEP, that the Master Code List, doesn't have, I will add the data to the list, already available.
    This will then, shows when the "Sweep Summary", is ran, it should pick up the SWEEP availability, from the products that I add to Col B, weekly.
    I hope that all makes sense.

    not sure how you want me to shows data.

    Many thanks

    Pugg

  52. #52
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi Pugg,


    not sure how you want me to shows data


    See the attached workbook for what I had in mind.

    Regards,

    Greg M

  53. #53
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    Thanks for the workbook sent through.

    If I see and reading this right:

    The additions to the Master Code List, will only be SWEEP, if allowed to SWEEP into the next product.
    if the next product cannot SWEEP into anything, then WASH needs to be entered:
    Example:
    511616 SPM will SWEEP into 585270 10SPM
    But if 585270 10SPM cannot SWEEP into anything else, then WASH has to be submitted.

    Hope that makes sense, If I get it right.

    Pugg

  54. #54
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    I used the updated file against this weeks products, to see if the SWEEP's shown, Quality will validate.
    it worked exactly as you have updated and is great.

    Is there anything that needs to be updated, from the previous message, I sent you.

    Many thanks

    Pugg

  55. #55
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    Do you know, if there is any further work to be added to this project, or does it now need closing off

    Many thanks

    Pugg

  56. #56
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    I came across an error, when running a future week.

    This is what came up:

    .Offset(iNoFound, 0).Value = sProduct_Primary

    I think I fixed it by pasting Cells I & J further down, as the Blue cells stopped and the error popped up.

    Is that true, ot would you say it is something else.

    Here is a copy of the sheet.
    Attached Files Attached Files

  57. #57
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi again Pugg,

    The error occurred because the number of Products being checked exceeded the number of rows (30) in a Defined Name Range. See the attached workbook for how to avoid this.

    Regards,

    Greg M

  58. #58
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    Thanks for the update.

    I have added to my file.

    Is there anything else that is required, for this to be complete?

    Many thanks

    Pugg

  59. #59
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi Pugg,

    I still cannot understand how you decide what to add to the Master list after you have performed the checks.

    Can you please post a workbook which highlights the block of text which you have added to the Master list after performing the checks for a specific week.

    Regards,

    Greg M

  60. #60
    Forum Contributor
    Join Date
    03-23-2011
    Location
    Ormesby
    MS-Off Ver
    Microsoft 365 MSO
    Posts
    130

    Re: Match codes from file

    Greg hi,

    We will be checking next weeks products tomorrow, so once updated, I will send the file across, with info, hopefully you will understand, that shows SWEEP etc.

    Many thanks

    Pugg

  61. #61
    Registered User
    Join Date
    06-07-2018
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    20

    Re: Match codes from file

    I was randomly browsing, and I saw AliGW's comment about there being a large number of views of this thread, but no one helping. I think because there is so much back and forth, and the thread is so long, that it seems like this must be well-in-hand, so no need to dive into it. Frankly, there is a lot of text to digest here. I started to read it - got as far as the word "SWEEP", and got thoroughly lost. I would love to help if I can, but I have no idea what 'sweep' refers to - perhaps it's a cultural or industry term. My focus is VBA, so happy to help if needed - I just don't know if I'm needed...?

  62. #62
    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,647

    Re: Match codes from file

    If you read on, you will see that a solution is being worked towards with GregM.

  63. #63
    Registered User
    Join Date
    06-07-2018
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    20

    Re: Match codes from file

    Yes, I got there eventually. Thank you for following up.

  64. #64
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Match codes from file

    Hi Pugg,


    We will be checking next weeks products tomorrow, so once updated, I will send the file across, with info, hopefully you will understand, that shows SWEEP etc.


    Still waiting!

    Regards,

    Greg M

+ 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] Compare JSON data and splitting into corrected codes, deleted codes and added codes
    By chandramouliarun in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 12-01-2020, 06:46 AM
  2. [SOLVED] Compare JSON data and splitting into corrected codes, deleted codes and added codes
    By chandramouliarun in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-29-2020, 12:06 PM
  3. [SOLVED] Need to match managers to certain codes
    By Bjarnebananen in forum Excel General
    Replies: 3
    Last Post: 01-22-2020, 09:28 AM
  4. [SOLVED] Match Codes Across Sheet in Excel
    By diksha_16 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-14-2017, 03:41 AM
  5. [SOLVED] two tab post codes match
    By AaruJaan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2017, 11:58 AM
  6. Match Product Codes with Text
    By scottiangrieve in forum Excel General
    Replies: 12
    Last Post: 05-17-2017, 05:31 AM
  7. Match & highlight codes in worksheets
    By esh27 in forum Excel General
    Replies: 2
    Last Post: 01-20-2009, 08:54 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