+ Reply to Thread
Results 1 to 20 of 20

Extract Unique values from the list of Duplicates and copy into another column

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Extract Unique values from the list of Duplicates and copy into another column

    Hi there,
    I have a request where i want to take out the Unique values from the list of duplicates jobs# & copy the unique jobs# into another column, & then copy the respective status into another column, as shown in the attached Excel ,"Example" sheet

    Note: Unique status will be updated only if all the duplicate jobs# has the respective status , else it will be blank

    i would appreciate if you could provide me some help on this
    pls. find the excel file in the attachment!

    Thanking you in anticipation
    Abrar
    Attached Files Attached Files

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

    Re: Extract Unique values from the list of Duplicates and copy into another column

    Hello nadeemm and Welcome to Excel Forum.
    Are you open to a formula solution with helpers?
    If not disregard, however if so the following seems to work for the Unique Job # column on the example sheet:
    1) Populate column 7 using: =COUNTIF(R2C2:RC[-5],RC[-5])
    2) Populate column 8 using: =SUMPRODUCT((R2C2:R15C2=RC[-6])*(R2C1:R15C1=""))
    3) Populate the Unique Job # column using: =IF(AND(RC[3]=1,RC[4]=0),RC[-2],"")
    Note that the contents of columns 7 and 8 could be moved and/or hidden for aesthetic purposes.
    If this is something you might be able to use I'll attempt to find formulas to fill the Unique Integration and Status columns.
    Question: Is the R1C1 reference mandatory for this spreadsheet?
    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.

  3. #3
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    Thank you, sir, for your kind support

    Actually, I was looking for a VBA to set this right, if this can be achievable thru formula's then also no issues

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

    Re: Extract Unique values from the list of Duplicates and copy into another column

    It would be helpful to know if you need the formulas written using R1C1 references, or can they be written using A1 references.

  5. #5
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    Yes sir, A1 reference will work for me
    I'm attaching the file with "Sample Data" in the 'sorted data' sheet in the attached excel
    pls. have a review to better understand the request

    for Example:
    The Duplication JOBs are having each separate "Status" for each milestone (Like - Integration Status, On-Air Status, PAT status, Handover Status..)
    what we need is to pull out the Unique JOBs in a Separate Column (existing in the "Sorted Data" Sheet )and provide its Status for these different milestones(also existing in the "Sorted Data" Sheet ),
    like IF a single which has many Duplicates, all may or may not have its respective "statuses" for their respective milestones(Like - Integration Status, On-Air Status, PAT status, Handover Status..)
    IF all of the duplicates of a single JOB has all the "Status" filled then the Unique JOb will show the same 'Status' else blank
    (Please refer the attached "Sample Data" in the 'Sorted Data' sheet for your understanding)

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

    Re: Extract Unique values from the list of Duplicates and copy into another column

    As no file is attached to post #5, I am going to use the file attached to post #2.
    Changing to A1 references, the following formulas are used:
    1) Helper column G: =COUNTIF($B$2:B2,B2)
    2) Helper column H: =SUMPRODUCT(($B$2:$B$15=B2)*($A$2:$A$15=""))
    3) Helper column I: =SUMPRODUCT(($B$2:$B$15=B2)*($C$2:$C$15=""))
    4) Unique Job # column: =IF(AND(G2=1,H2=0),B2,"")
    5) "Unique JOB# Status (Integration)" column: =IF(AND(G2=1,H2=0),A2,"")
    6) "Unique JOB# Status (On Air)" column: =IF(AND(G2=1,I2=0),C2,"")
    Note that the formulas in the latter two columns produce some results that differ from what was previously listed, although in both cases the 'status' is completed for all duplicates listed. I have highlighted the differences in red.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    Please use this link to download the file , as i'm unable to upload it here

  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 2406
    Posts
    44,662

    Re: Extract Unique values from the list of Duplicates and copy into another column

    The link didn't work... but you CAN upload files here. Sometimes you have to try more than once or twice, though!!


    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    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

  9. #9
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    I'm unable to share any links here! how should i share the file then?

  10. #10
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    did that , but not working, when uploading it displays error msg as "fail to upload"

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

    Re: Extract Unique values from the list of Duplicates and copy into another column

    See post 8. You've laready uploaded a file once (at post 1) so doing so again shouldn't be too big a problem.

  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 2406
    Posts
    44,662

    Re: Extract Unique values from the list of Duplicates and copy into another column

    Quote Originally Posted by nadeemm View Post
    did that , but not working, when uploading it displays error msg as "fail to upload"
    Do it again. And again. Sometimes it doesn't work. What size is the file? 10 - 20 carefully chosen rows is enough. 20,000 rows is useless as manual checking is pretty much impossible.

  13. #13
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    what i'm doing with this file here is just sorting out data from "Raw data" sheet into "Sorted data" sheet upon some conditions,
    my only task is not getting achievable when i want to operate the Unique JOBs from the duplicates into a separate column and also
    put its respective 'Statuses" in their respective columns, (as i explain earlier)
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    Thanks Glenn it worked

  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 2406
    Posts
    44,662

    Re: Extract Unique values from the list of Duplicates and copy into another column

    Fine. But with 9000 rows to look at (not the 10-20 I wanted) I have now NO IDEA what you want!!

    So. Each row in raw data column A is unique. So where are the duplicates that you are talking about?

    On what basis did you decide that rows 7, 8 & 9 had the same job number? Where did the number come from?


    Which columns in which sheet should i be looking at!!!

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

    Re: Extract Unique values from the list of Duplicates and copy into another column

    On sorted data, these three Telecom IDs:
    217670
    223526
    219231

    have been grouped together in column I with the same job number. Why? There is nothing in common (as far as I can see) in the raw data rows for these 3. Where did the unique job no. come from.

    Make a SENSIBLE sample file of 10-20 rows and clearly indicate what your expected results are.

  17. #17
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    Dear sir,
    I'm sorry if i'm not explaining it clearly

    I was explaining the above calculations on the "Telecom JOB numbers" (column I) which has duplicates

    & in the "SOrted data" sheet i have just written it to explain what i want to achieve with sample data

    Note: please use the "Sorted data" sheet to write your formula

    for Example:
    The Duplication JOBs (column I) are having each separate "Status" for each milestone (Like - Integration Status, On-Air Status, PAT status, Handover Status..)
    what I need is to pull out the Unique JOBs in a Separate Column (Column J) (existing in the "Sorted Data" Sheet )and provide its 'Status' for these different milestones (Columns K,N,R,U)(also existing in the "Sorted Data" Sheet ),

    like IF a single "Telecom JOB" which has many Duplicates, all may or may not have its respective "statuses" for their respective milestones(Like - Integration Status, On-Air Status, PAT status, Handover Status..)
    IF all of the duplicates of a single JOB has all the "Status" filled then the Unique JOb will show the same 'Status' else it will show "In Progress"

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

    Re: Extract Unique values from the list of Duplicates and copy into another column

    I think I understand now...

    Take a look at this.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    05-15-2013
    Location
    Riyadh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Extract Unique values from the list of Duplicates and copy into another column

    wow... amazing it worked perfectly
    you are a true genius, hats off to you sir!

    Thanks a lot




    just in case, If possible can we convert this formula to VBA code! (Not so important as the formula is working for me,
    I'm asking just because whenever i filter something it takes time in caluations and works slow)

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

    Re: Extract Unique values from the list of Duplicates and copy into another column

    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.

+ 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] Extract Unique Values from Duplicates with Criteria
    By Ian McPherson in forum Excel General
    Replies: 2
    Last Post: 12-07-2017, 04:22 AM
  2. Creating a list of unique values out of duplicates
    By crfcaio in forum Excel General
    Replies: 2
    Last Post: 11-10-2017, 01:12 PM
  3. [SOLVED] Formula to Extract Unique Values/Remove Duplicates Across Multiple Columns of Data
    By Lanceh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-24-2017, 09:07 AM
  4. Replies: 11
    Last Post: 10-27-2016, 07:33 PM
  5. List of unique text values from a list with duplicates
    By canoeron in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-11-2014, 11:27 PM
  6. [SOLVED] Extract a list that allows specific value to have duplicates but not any other values.
    By bike_far in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2013, 10:07 AM
  7. [SOLVED] Extract an unique list from 2 different lists without duplicates
    By akalien in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-06-2012, 06:09 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