+ Reply to Thread
Results 1 to 3 of 3

Macro to expand range

  1. #1
    Registered User
    Join Date
    10-05-2010
    Location
    Israel
    MS-Off Ver
    Excel 2013
    Posts
    11

    Macro to expand range

    I have bunch of spreadsheets with ranges of strings in this format - Annn:Annn, where A is a constant (can be any letter) and nnn is a 1 to 3 digit number. For example R3:R8 or C5:C112. These strings are always in the same spreadsheet column.

    I need a macro that would expand these ranges to include all of the intermediate values, separated by commas and spaces. For example, R3:R8 should expand to R3, R4, R5, R6, R7, R8.

    I'm guessing this would not be terribly difficult to do in a macro, but it is beyond my capabilities.

    TIA

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,995

    Re: Macro to expand range

    If, by any chance, you are NOT still using Excel 2003, and have moved on to Excel 365, you could do this with a formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,244

    Re: Macro to expand range

    ?
    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] Modify macro if found empty cell to do nothing and expand the range of macro
    By oeyandyprawira in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-15-2018, 03:44 AM
  2. Replies: 6
    Last Post: 11-13-2018, 04:54 AM
  3. [SOLVED] SUMIF formula with dynamic column range and then expand the width of SUM range
    By gravythief in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-26-2017, 08:36 AM
  4. [SOLVED] Expand a range when you click any cell in the last line of the range
    By Dickie Dunkin in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-17-2016, 03:32 PM
  5. Macro te expand/collapse range
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-12-2014, 06:36 AM
  6. [SOLVED] Excel 2010 - Defined range does not expand when a row is inserted by a macro
    By UncleRowan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-01-2012, 09:25 AM
  7. Expand Macro Range
    By EmilyB in forum Excel General
    Replies: 5
    Last Post: 01-09-2011, 06:58 PM

Tags for this Thread

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