+ Reply to Thread
Results 1 to 5 of 5

Store consecutive cells range

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    19

    Store consecutive cells range

    Hi everyone,

    I'm having trouble coming up with a macro that will loop through a selected column to check for consecutive occurrences and store their ranges.

    Here's what i mean:

    If the column C has the numbers

    C1 - 2
    C2 - 2
    C3 - 2
    C4 - 3
    C5 - 3

    the macro will store the range C1:C3 and C4:C5, maybe in a array.

    Any help would be appreciated.

  2. #2
    Forum Contributor codeslizer's Avatar
    Join Date
    05-28-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2003 - 2010
    Posts
    245

    Re: Store consecutive cells range

    Hi there..

    What are you trying to achieve through this? Are you trying to get range based on a certain condition like get all product names and details if their type is "Type2" or something?
    cOdEsLiZeR - Back after a long break.. Let's sLiZe some more cOdEs!!

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Store consecutive cells range

    Hi fgg,
    try
    Please Login or Register  to view this content.

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Store consecutive cells range

    This is an option to store Each Duplicate range as a range variable
    Please Login or Register  to view this content.
    Regards Mick

  5. #5
    Registered User
    Join Date
    04-28-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Store consecutive cells range

    Thank you for all your options.
    Let me digest all this code and i'll get post back the results.

+ 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] Store range into array?
    By matchooo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2013, 06:28 PM
  2. Replies: 1
    Last Post: 05-29-2013, 10:35 AM
  3. Replies: 6
    Last Post: 04-28-2012, 08:50 AM
  4. [SOLVED] Selecting a range of consecutive cells within a range
    By 8-bit in forum Excel General
    Replies: 2
    Last Post: 04-22-2012, 06:35 PM
  5. Replies: 1
    Last Post: 03-09-2006, 03:50 PM

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