+ Reply to Thread
Results 1 to 7 of 7

Find cells with same values

  1. #1
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Find cells with same values

    Hello All

    I want to find cells in 1 column with the same value and show the range from the second cell up until the last cell with the same value, do something and continue to the next set

    I attached a sample file.

    For example, in Range("A1:A7") is "Sample Text 1". Find all the same cells, but show Range("A2:A7")

    "Sample Text 2" must show "A9"
    "Sample Text 6" must show "A14:A15"
    "Sample Text 7" must show "A17"
    "Sample Text 8" must show "A19:A24"

    Thank you
    Attached Files Attached Files
    Regards
    LAD

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Find cells with same values

    What do you mean show?

    Do you want this as the result....

    "Sample Text 2" must show "A9"
    "Sample Text 6" must show "A14:A15"
    "Sample Text 7" must show "A17"
    "Sample Text 8" must show "A19:A24"

    do something and continue to the next set
    And...Do what?

    This will give you an idea to "SHOW" the address of each Sample Text
    Please Login or Register  to view this content.
    Last edited by Sintek; 09-23-2021 at 11:01 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Re: Find cells with same values

    Thank you sintek, but it must skip where there is only 1 value, in this case A10, A11 & A12 must be skipped, as there is no duplicates
    And it must just show the address
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Re: Find cells with same values

    My end goal is to group the yellow rows with the yellow cells, so that only 1 cell of each value is shown in level 1

  5. #5
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2019
    Posts
    346

    Re: Find cells with same values

    i found the perfect macro on another forum

    Please Login or Register  to view this content.

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: Find cells with same values

    Thank you sintek, but it must skip where there is only 1 value, in this case A10, A11 & A12 must be skipped, as there is no duplicates
    And it must just show the address
    This was not mentioned...It would have been so much easier if you were just more transparent with your requirement...
    This red snippet skips that ...
    Please Login or Register  to view this content.
    Still have no idea what you really want to do as no clear explanation has been given...
    My end goal is to group the yellow rows with the yellow cells, so that only 1 cell of each value is shown in level 1
    So are you wanting theses rows hidden?
    If so then this snippet can be used...
    Please Login or Register  to view this content.
    Last edited by Sintek; 09-24-2021 at 02:11 AM.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Find cells with same values

    Quote Originally Posted by CobraLAD View Post
    I attached a sample file.

    For example, in Range("A1:A7") is "Sample Text 1". Find all the same cells, but show Range("A2:A7")

    "Sample Text 2" must show "A9"
    "Sample Text 6" must show "A14:A15"
    "Sample Text 7" must show "A17"
    "Sample Text 8" must show "A19:A24"
    Please Login or Register  to view this content.

+ 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] How can I use .find() to find values (not formulas of cells)?
    By vizzkid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2014, 08:56 AM
  2. [SOLVED] Formula or VBA - Comparison CSV Values between 3 cells for used range. Find unique values.
    By grphillips in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 06-09-2014, 02:12 PM
  3. [SOLVED] Use .Cells.Find(What:=) to find values in Multiple Cells
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-13-2014, 02:39 PM
  4. Replies: 7
    Last Post: 12-04-2012, 06:23 AM
  5. Find corresponding values from different cells
    By sd_dude in forum Excel General
    Replies: 15
    Last Post: 06-12-2012, 04:11 PM
  6. Find the BEST TWO VALUES from 5 cells
    By acsishere in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2011, 01:57 AM
  7. Replies: 3
    Last Post: 02-02-2010, 10: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