+ Reply to Thread
Results 1 to 18 of 18

Finding the Added and Deleted Codes out of the two sets of Codes Entered

  1. #1
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Red face Finding the Added and Deleted Codes out of the two sets of Codes Entered

    Hi All,

    Hope you are doing well!..I am trying to get the added and deleted codes from two sets of codes entered...Attached the worksheet in which Deleted code and Addedcode columns are the required output...The deleted codes are which are not present in Code B but which is there in Code A..The added codes are which are present in Code B but which are not present in Code A....Can you please help me here..


    Thanks,
    Arun
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    see if this works for you:

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    @JLGWhiz:Appreciate your response!..Can you please provide me with your excel sheet ...

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    Quote Originally Posted by chandramouliarun View Post
    @JLGWhiz:Appreciate your response!..Can you please provide me with your excel sheet ...
    I used yours in the linked file.

  5. #5
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Red face Find the count of Added and Deleted codes by Coder

    Hi All,

    I have a file in which every coder has code corrections in two columns -AddCode and Deletedcode ..I am trying to build a view which gives the number of corrections for every code by the coder (inclusive of the addcode and deletedcode)..Please find attached the excel sheet where I have highlighted the output in yellow..I have also provided the input as coder,deletedcode and addcode.. Can you please help me here...


    Thanks,
    Arun
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Find the count of Added and Deleted codes by Coder

    Naughty you!! You changed the attachment after posting!!

    The 908/U908 issue caused some problems, for a while...

    =IF($G2="","",SUMPRODUCT((($A$2:$A$6=H$1)*(LEN("¦"&SUBSTITUTE($B$2:$C$6,",","¦"))-(LEN(SUBSTITUTE("¦"&SUBSTITUTE($B$2:$C$6,",","¦"),"¦"&$G2,"")))))/LEN("¦"&$G2)))

    copied across and down.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Find the count of Added and Deleted codes by Coder

    Ooops. And I was naughty, too. here's the file...
    Attached Files Attached Files

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Find the count of Added and Deleted codes by Coder

    Or, as per your parallel post, not sorted by coder:


    =IF($G2="","",SUMPRODUCT(((LEN("¦"&SUBSTITUTE($B$2:$C$6,",","¦"))-(LEN(SUBSTITUTE("¦"&SUBSTITUTE($B$2:$C$6,",","¦"),"¦"&$G2,"")))))/LEN("¦"&$G2)))

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Find the count of Added and Deleted codes by Coder

    and the file, for not sorted by coder.
    Attached Files Attached Files

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    Chandramoulian. Re-read the forum rules, especially Rule 5.

    5. Do not open more than ONE thread per issue here. Expect duplicates to be closed.

    You have made 3 threads on, essentially, the same problem. I have closed one of them and merged the other two (both of which have had replies).

    Please DO NOT duplicate threads again. It makes everything VERY messy.

  11. #11
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    @Glenn Kennedy: Sure!..I will make sure to not repeat it again....Thought it would provide more clarity..

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    So do any/all of the offered appriaches work, or are modifications needed?

  13. #13
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Red face Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    Hi Glenn, For the file not sorted by order and also for the file sorted by coder..Is it possible to automatically total list of distinct code column from the deleted code and the add code column ,instead of manually entering the code column ... Otherwise this works awesome!!


    Thanks,
    Arun
    Last edited by chandramouliarun; 12-08-2020 at 03:20 AM.

  14. #14
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    Hi JLGWhiz,

    Really Appreciate your help!..The only problem is that say that the Code A is 99204,93010,99204,93010 and the Code B is 99204,93010..Both the addedcode and deletedcode are showing as blank but the deletedcode should be 99204,93010.. These cases are being missed out..Can you please help here!..


    Thanks,
    Arun

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    I added one helper column (column H) to split up the concatenated coder IDs:

    =TRIM(MID(SUBSTITUTE(","&CONCAT($B$2:$B$6&","&$C$2:$C$6&","),",",REPT(" ",125)),125*ROWS($1:1),125))

    and a formula in I2 to return the unique codes:
    =IFERROR(INDEX(H:H,AGGREGATE(15,6,ROW($H$2:$H$21)/(($H$2:$H$21<>"")*(COUNTIF(I$1:I1,$H$2:$H$21)=0)),1)),"")

    and a formula in J1 to return the unique coders:
    =IFERROR(INDEX($A:$A,AGGREGATE(15,6,ROW($A$2:$A$10)/(($A$2:$A$10<>"")*(COUNTIF($I1:I1,$A$2:$A$10)=0)),1)),"")

    You're welcome.



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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    @Glenn!..This is so awesome..I am just waiting for one more reply JLGWhiz to close this thread!..This forum is very helpful!

  17. #17
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    Quote Originally Posted by chandramouliarun View Post
    @Glenn!..This is so awesome..I am just waiting for one more reply JLGWhiz to close this thread!..This forum is very helpful!
    If you have duplicates in one or the other categories and only one of the duplicates is removed while that same value is still in the other category, then the code was not removed, only the duplicate was removed. I don't know how to tell if a duplicate is removed without doing some complex coding that I don't have an inclination to do.
    Regards, JLG

  18. #18
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Finding the Added and Deleted Codes out of the two sets of Codes Entered

    Sure JLGWhiz!..Appreciate your help...

+ 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. Added codes to macro and some codes no longer work
    By alisoncleverly in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2020, 01:26 PM
  4. [SOLVED] Convert Y Codes from one column to another based on Unique Codes
    By ashishmehra2010 in forum Excel General
    Replies: 2
    Last Post: 10-06-2015, 09:49 PM
  5. Replies: 7
    Last Post: 08-13-2015, 10:58 AM
  6. Replies: 1
    Last Post: 12-10-2013, 12:28 AM
  7. Replies: 0
    Last Post: 10-09-2013, 07:59 PM

Tags for this Thread

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