+ Reply to Thread
Results 1 to 2 of 2

Identifying and selecting adjacent duplicate values

  1. #1
    Registered User
    Join Date
    01-19-2017
    Location
    Milwaukee, WI
    MS-Off Ver
    2010
    Posts
    6

    Identifying and selecting adjacent duplicate values

    My goal is to select and merge all adjacent duplicates in a given column. The obstacle I've come to is selecting the duplicates to merge. I've written code to insert a 'helper column' that returns a 1 at the top and 2 at the bottom of all ranges to be merged. I have yet to figure out any way to use this column to actually select the appropriate cells. I've also thought about inserting a new row to separate the ranges to be merged and to create a natural breakpoint.


    Attachment 499643

    If it's easier to visualize, I want to merge all cells between the borders, or all cells in each range from 2->1.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Identifying and selecting adjacent duplicate values

    Hi
    I don't think your helper column is needed. This macro should merge all cells in the active column with duplicate values, starting at the active cell and continuing down until it finds s blank cell.
    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. Identifying and selecting adjacent duplicate values
    By micszekely in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2017, 05:52 PM
  2. Identifying duplicate values in a row, and change the value with them
    By Cody0812 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2016, 09:18 AM
  3. [SOLVED] Identifying Duplicate Values (2nd, 3rd, and 4th occurance)
    By Montoro22 in forum Excel General
    Replies: 2
    Last Post: 07-31-2013, 11:30 AM
  4. [SOLVED] Help needed! Identifying duplicate values with functions
    By PdubNZL in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-14-2013, 08:19 PM
  5. Identifying duplicate lines using multiple values
    By dantray in forum Excel General
    Replies: 8
    Last Post: 02-09-2012, 10:51 AM
  6. Identifying Range of Different Duplicate Values
    By stonegwene in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2011, 02:05 PM
  7. Selecting values from adjacent rows
    By illinge in forum Excel General
    Replies: 3
    Last Post: 11-05-2009, 10:38 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