Find Duplicates Outside of Selection/Highlight in the Same Column - Excel The 2019 Stack...

Return to UK after being refused entry years previously

How to manage monthly salary

Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?

Multiply Two Integer Polynomials

Did Section 31 appear in Star Trek: The Next Generation?

How to type this arrow in math mode?

Can you compress metal and what would be the consequences?

Do these rules for Critical Successes and Critical Failures seem Fair?

"as much details as you can remember"

What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

How to support a colleague who finds meetings extremely tiring?

Origin of "cooter" meaning "vagina"

Resizing object distorts it (Illustrator CC 2018)

Are spiders unable to hurt humans, especially very small spiders?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?

Can we generate random numbers using irrational numbers like π and e?

Why did Acorn's A3000 have red function keys?

Is a "Democratic" Oligarchy-Style System Possible?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

For what reasons would an animal species NOT cross a *horizontal* land bridge?

Right tool to dig six foot holes?

Time travel alters history but people keep saying nothing's changed



Find Duplicates Outside of Selection/Highlight in the Same Column - Excel



The 2019 Stack Overflow Developer Survey Results Are InMulti-value selection in an Excel cellIs is possible to make a cell non editable based on drop down selection in ExcelExcel: Find duplicates among 2 columsCan Excel 2013 show the formula instead of the value only in certain cells?Find rows where Column B is different but Column A is the sameCount cells based on a comparison with value in the same row of another columnExcel column can't be included in sortFormula-based conditional formatting to format cells in the same rowExcel - Highlight and remove duplicate column values in rowSort/select by duplicates containing cell colour





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I want to Sort a column,
then select a section of that column,
and then Un-sort the column
and let Excel find me all duplicates throughout that column that corresponds to any of the cells I selected before and preferably select them.



In short, I need Excel to find me any duplicates of any cell inside my selection, but OUTSIDE of my selection in the same column.



Example:



(34 SELECTED)    
(73 SELECTED)
23
86
234
21
73
853
34
11


OUTCOME:



(34 SELECTED)    
(73 SELECTED)
23
86
234
21
(73 SELECTED)
853
(34 SELECTED)
11


Can someone help me?










share|improve this question









New contributor




James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • In your Outcome 34 & 73 appears twice since you are looking for Duplicates, also other values are unique,, I think you need to edit the post to clear your need !!

    – Rajesh S
    yesterday













  • Hey Rajesh, thanks for getting back to me. Yes, this is exactly what I'm looking for; I want to find duplicate cells of the cells I have selected. In the example, I have selected 34 an 73, so I want to select ALL 34 and 73's in the whole column. I hope this clarifies it.

    – James
    yesterday











  • What you are looking for is possible using Auto/Advance Filter also, VBA (Macro) can be used also ,, confirm can you handle VBA ?

    – Rajesh S
    yesterday




















1















I want to Sort a column,
then select a section of that column,
and then Un-sort the column
and let Excel find me all duplicates throughout that column that corresponds to any of the cells I selected before and preferably select them.



In short, I need Excel to find me any duplicates of any cell inside my selection, but OUTSIDE of my selection in the same column.



Example:



(34 SELECTED)    
(73 SELECTED)
23
86
234
21
73
853
34
11


OUTCOME:



(34 SELECTED)    
(73 SELECTED)
23
86
234
21
(73 SELECTED)
853
(34 SELECTED)
11


Can someone help me?










share|improve this question









New contributor




James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • In your Outcome 34 & 73 appears twice since you are looking for Duplicates, also other values are unique,, I think you need to edit the post to clear your need !!

    – Rajesh S
    yesterday













  • Hey Rajesh, thanks for getting back to me. Yes, this is exactly what I'm looking for; I want to find duplicate cells of the cells I have selected. In the example, I have selected 34 an 73, so I want to select ALL 34 and 73's in the whole column. I hope this clarifies it.

    – James
    yesterday











  • What you are looking for is possible using Auto/Advance Filter also, VBA (Macro) can be used also ,, confirm can you handle VBA ?

    – Rajesh S
    yesterday
















1












1








1








I want to Sort a column,
then select a section of that column,
and then Un-sort the column
and let Excel find me all duplicates throughout that column that corresponds to any of the cells I selected before and preferably select them.



In short, I need Excel to find me any duplicates of any cell inside my selection, but OUTSIDE of my selection in the same column.



Example:



(34 SELECTED)    
(73 SELECTED)
23
86
234
21
73
853
34
11


OUTCOME:



(34 SELECTED)    
(73 SELECTED)
23
86
234
21
(73 SELECTED)
853
(34 SELECTED)
11


Can someone help me?










share|improve this question









New contributor




James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I want to Sort a column,
then select a section of that column,
and then Un-sort the column
and let Excel find me all duplicates throughout that column that corresponds to any of the cells I selected before and preferably select them.



In short, I need Excel to find me any duplicates of any cell inside my selection, but OUTSIDE of my selection in the same column.



Example:



(34 SELECTED)    
(73 SELECTED)
23
86
234
21
73
853
34
11


OUTCOME:



(34 SELECTED)    
(73 SELECTED)
23
86
234
21
(73 SELECTED)
853
(34 SELECTED)
11


Can someone help me?







microsoft-excel






share|improve this question









New contributor




James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Akina

1,38329




1,38329






New contributor




James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









JamesJames

62




62




New contributor




James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






James is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • In your Outcome 34 & 73 appears twice since you are looking for Duplicates, also other values are unique,, I think you need to edit the post to clear your need !!

    – Rajesh S
    yesterday













  • Hey Rajesh, thanks for getting back to me. Yes, this is exactly what I'm looking for; I want to find duplicate cells of the cells I have selected. In the example, I have selected 34 an 73, so I want to select ALL 34 and 73's in the whole column. I hope this clarifies it.

    – James
    yesterday











  • What you are looking for is possible using Auto/Advance Filter also, VBA (Macro) can be used also ,, confirm can you handle VBA ?

    – Rajesh S
    yesterday





















  • In your Outcome 34 & 73 appears twice since you are looking for Duplicates, also other values are unique,, I think you need to edit the post to clear your need !!

    – Rajesh S
    yesterday













  • Hey Rajesh, thanks for getting back to me. Yes, this is exactly what I'm looking for; I want to find duplicate cells of the cells I have selected. In the example, I have selected 34 an 73, so I want to select ALL 34 and 73's in the whole column. I hope this clarifies it.

    – James
    yesterday











  • What you are looking for is possible using Auto/Advance Filter also, VBA (Macro) can be used also ,, confirm can you handle VBA ?

    – Rajesh S
    yesterday



















In your Outcome 34 & 73 appears twice since you are looking for Duplicates, also other values are unique,, I think you need to edit the post to clear your need !!

– Rajesh S
yesterday







In your Outcome 34 & 73 appears twice since you are looking for Duplicates, also other values are unique,, I think you need to edit the post to clear your need !!

– Rajesh S
yesterday















Hey Rajesh, thanks for getting back to me. Yes, this is exactly what I'm looking for; I want to find duplicate cells of the cells I have selected. In the example, I have selected 34 an 73, so I want to select ALL 34 and 73's in the whole column. I hope this clarifies it.

– James
yesterday





Hey Rajesh, thanks for getting back to me. Yes, this is exactly what I'm looking for; I want to find duplicate cells of the cells I have selected. In the example, I have selected 34 an 73, so I want to select ALL 34 and 73's in the whole column. I hope this clarifies it.

– James
yesterday













What you are looking for is possible using Auto/Advance Filter also, VBA (Macro) can be used also ,, confirm can you handle VBA ?

– Rajesh S
yesterday







What you are looking for is possible using Auto/Advance Filter also, VBA (Macro) can be used also ,, confirm can you handle VBA ?

– Rajesh S
yesterday












2 Answers
2






active

oldest

votes


















1














Sub SelectBySelection()
Dim tempArray()
Dim oneCell As Range
Dim i As Integer
Dim tempStr As String
Dim tempSelection As String

If Selection.Areas.Count > 1 Then Exit Sub
tempArray = Selection.Value
For i = LBound(tempArray, 1) To UBound(tempArray, 1)
tempStr = tempStr & Chr(0) & tempArray(i, 1)
Next
tempStr = tempStr & Chr(0)
For Each oneCell In Range(Selection.EntireColumn.End(xlUp), Selection.EntireColumn.End(xlDown))
If InStr(tempStr, Chr(0) & oneCell.Value & Chr(0)) Then
tempSelection = tempSelection & "," & oneCell.Address
End If
Next
Range(Mid(tempSelection, 2)).Select
End Sub


enter image description here






share|improve this answer


























  • ,, this code is doing nothing,, OP wants to display Duplicates !!

    – Rajesh S
    yesterday











  • @RajeshS This code selects all cells within a column which have the value equal to any value within starting selection - i.e. it selects all duplicates. In any case, the result is exactly what OP shows. Select first two cells, run the code - you will obtain 1,2,7 and 9 cells selected.

    – Akina
    yesterday











  • I've already tried it ,, then written comments,, finding no effect,, is this Standard module or a Module ?

    – Rajesh S
    yesterday











  • @RajeshS of course, Create - Module. All operations are performed on active sheet.

    – Akina
    yesterday











  • I've use as Module too,, but no effect!!

    – Rajesh S
    yesterday



















0














You can use AutoFilter




  1. select 34 & 73 in AutoFilter

  2. mark each cell with CTRL + single Mouse klick

  3. select all in AutoFilter


https://i.stack.imgur.com/EJJ3E.jpg






share|improve this answer


























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    James is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1423203%2ffind-duplicates-outside-of-selection-highlight-in-the-same-column-excel%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Sub SelectBySelection()
    Dim tempArray()
    Dim oneCell As Range
    Dim i As Integer
    Dim tempStr As String
    Dim tempSelection As String

    If Selection.Areas.Count > 1 Then Exit Sub
    tempArray = Selection.Value
    For i = LBound(tempArray, 1) To UBound(tempArray, 1)
    tempStr = tempStr & Chr(0) & tempArray(i, 1)
    Next
    tempStr = tempStr & Chr(0)
    For Each oneCell In Range(Selection.EntireColumn.End(xlUp), Selection.EntireColumn.End(xlDown))
    If InStr(tempStr, Chr(0) & oneCell.Value & Chr(0)) Then
    tempSelection = tempSelection & "," & oneCell.Address
    End If
    Next
    Range(Mid(tempSelection, 2)).Select
    End Sub


    enter image description here






    share|improve this answer


























    • ,, this code is doing nothing,, OP wants to display Duplicates !!

      – Rajesh S
      yesterday











    • @RajeshS This code selects all cells within a column which have the value equal to any value within starting selection - i.e. it selects all duplicates. In any case, the result is exactly what OP shows. Select first two cells, run the code - you will obtain 1,2,7 and 9 cells selected.

      – Akina
      yesterday











    • I've already tried it ,, then written comments,, finding no effect,, is this Standard module or a Module ?

      – Rajesh S
      yesterday











    • @RajeshS of course, Create - Module. All operations are performed on active sheet.

      – Akina
      yesterday











    • I've use as Module too,, but no effect!!

      – Rajesh S
      yesterday
















    1














    Sub SelectBySelection()
    Dim tempArray()
    Dim oneCell As Range
    Dim i As Integer
    Dim tempStr As String
    Dim tempSelection As String

    If Selection.Areas.Count > 1 Then Exit Sub
    tempArray = Selection.Value
    For i = LBound(tempArray, 1) To UBound(tempArray, 1)
    tempStr = tempStr & Chr(0) & tempArray(i, 1)
    Next
    tempStr = tempStr & Chr(0)
    For Each oneCell In Range(Selection.EntireColumn.End(xlUp), Selection.EntireColumn.End(xlDown))
    If InStr(tempStr, Chr(0) & oneCell.Value & Chr(0)) Then
    tempSelection = tempSelection & "," & oneCell.Address
    End If
    Next
    Range(Mid(tempSelection, 2)).Select
    End Sub


    enter image description here






    share|improve this answer


























    • ,, this code is doing nothing,, OP wants to display Duplicates !!

      – Rajesh S
      yesterday











    • @RajeshS This code selects all cells within a column which have the value equal to any value within starting selection - i.e. it selects all duplicates. In any case, the result is exactly what OP shows. Select first two cells, run the code - you will obtain 1,2,7 and 9 cells selected.

      – Akina
      yesterday











    • I've already tried it ,, then written comments,, finding no effect,, is this Standard module or a Module ?

      – Rajesh S
      yesterday











    • @RajeshS of course, Create - Module. All operations are performed on active sheet.

      – Akina
      yesterday











    • I've use as Module too,, but no effect!!

      – Rajesh S
      yesterday














    1












    1








    1







    Sub SelectBySelection()
    Dim tempArray()
    Dim oneCell As Range
    Dim i As Integer
    Dim tempStr As String
    Dim tempSelection As String

    If Selection.Areas.Count > 1 Then Exit Sub
    tempArray = Selection.Value
    For i = LBound(tempArray, 1) To UBound(tempArray, 1)
    tempStr = tempStr & Chr(0) & tempArray(i, 1)
    Next
    tempStr = tempStr & Chr(0)
    For Each oneCell In Range(Selection.EntireColumn.End(xlUp), Selection.EntireColumn.End(xlDown))
    If InStr(tempStr, Chr(0) & oneCell.Value & Chr(0)) Then
    tempSelection = tempSelection & "," & oneCell.Address
    End If
    Next
    Range(Mid(tempSelection, 2)).Select
    End Sub


    enter image description here






    share|improve this answer















    Sub SelectBySelection()
    Dim tempArray()
    Dim oneCell As Range
    Dim i As Integer
    Dim tempStr As String
    Dim tempSelection As String

    If Selection.Areas.Count > 1 Then Exit Sub
    tempArray = Selection.Value
    For i = LBound(tempArray, 1) To UBound(tempArray, 1)
    tempStr = tempStr & Chr(0) & tempArray(i, 1)
    Next
    tempStr = tempStr & Chr(0)
    For Each oneCell In Range(Selection.EntireColumn.End(xlUp), Selection.EntireColumn.End(xlDown))
    If InStr(tempStr, Chr(0) & oneCell.Value & Chr(0)) Then
    tempSelection = tempSelection & "," & oneCell.Address
    End If
    Next
    Range(Mid(tempSelection, 2)).Select
    End Sub


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited yesterday

























    answered yesterday









    AkinaAkina

    1,38329




    1,38329













    • ,, this code is doing nothing,, OP wants to display Duplicates !!

      – Rajesh S
      yesterday











    • @RajeshS This code selects all cells within a column which have the value equal to any value within starting selection - i.e. it selects all duplicates. In any case, the result is exactly what OP shows. Select first two cells, run the code - you will obtain 1,2,7 and 9 cells selected.

      – Akina
      yesterday











    • I've already tried it ,, then written comments,, finding no effect,, is this Standard module or a Module ?

      – Rajesh S
      yesterday











    • @RajeshS of course, Create - Module. All operations are performed on active sheet.

      – Akina
      yesterday











    • I've use as Module too,, but no effect!!

      – Rajesh S
      yesterday



















    • ,, this code is doing nothing,, OP wants to display Duplicates !!

      – Rajesh S
      yesterday











    • @RajeshS This code selects all cells within a column which have the value equal to any value within starting selection - i.e. it selects all duplicates. In any case, the result is exactly what OP shows. Select first two cells, run the code - you will obtain 1,2,7 and 9 cells selected.

      – Akina
      yesterday











    • I've already tried it ,, then written comments,, finding no effect,, is this Standard module or a Module ?

      – Rajesh S
      yesterday











    • @RajeshS of course, Create - Module. All operations are performed on active sheet.

      – Akina
      yesterday











    • I've use as Module too,, but no effect!!

      – Rajesh S
      yesterday

















    ,, this code is doing nothing,, OP wants to display Duplicates !!

    – Rajesh S
    yesterday





    ,, this code is doing nothing,, OP wants to display Duplicates !!

    – Rajesh S
    yesterday













    @RajeshS This code selects all cells within a column which have the value equal to any value within starting selection - i.e. it selects all duplicates. In any case, the result is exactly what OP shows. Select first two cells, run the code - you will obtain 1,2,7 and 9 cells selected.

    – Akina
    yesterday





    @RajeshS This code selects all cells within a column which have the value equal to any value within starting selection - i.e. it selects all duplicates. In any case, the result is exactly what OP shows. Select first two cells, run the code - you will obtain 1,2,7 and 9 cells selected.

    – Akina
    yesterday













    I've already tried it ,, then written comments,, finding no effect,, is this Standard module or a Module ?

    – Rajesh S
    yesterday





    I've already tried it ,, then written comments,, finding no effect,, is this Standard module or a Module ?

    – Rajesh S
    yesterday













    @RajeshS of course, Create - Module. All operations are performed on active sheet.

    – Akina
    yesterday





    @RajeshS of course, Create - Module. All operations are performed on active sheet.

    – Akina
    yesterday













    I've use as Module too,, but no effect!!

    – Rajesh S
    yesterday





    I've use as Module too,, but no effect!!

    – Rajesh S
    yesterday













    0














    You can use AutoFilter




    1. select 34 & 73 in AutoFilter

    2. mark each cell with CTRL + single Mouse klick

    3. select all in AutoFilter


    https://i.stack.imgur.com/EJJ3E.jpg






    share|improve this answer






























      0














      You can use AutoFilter




      1. select 34 & 73 in AutoFilter

      2. mark each cell with CTRL + single Mouse klick

      3. select all in AutoFilter


      https://i.stack.imgur.com/EJJ3E.jpg






      share|improve this answer




























        0












        0








        0







        You can use AutoFilter




        1. select 34 & 73 in AutoFilter

        2. mark each cell with CTRL + single Mouse klick

        3. select all in AutoFilter


        https://i.stack.imgur.com/EJJ3E.jpg






        share|improve this answer















        You can use AutoFilter




        1. select 34 & 73 in AutoFilter

        2. mark each cell with CTRL + single Mouse klick

        3. select all in AutoFilter


        https://i.stack.imgur.com/EJJ3E.jpg







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited yesterday









        bummi

        1,49031422




        1,49031422










        answered yesterday









        alecxsalecxs

        464




        464






















            James is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            James is a new contributor. Be nice, and check out our Code of Conduct.













            James is a new contributor. Be nice, and check out our Code of Conduct.












            James is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1423203%2ffind-duplicates-outside-of-selection-highlight-in-the-same-column-excel%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

            VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

            Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...