+ Reply to Thread
Results 1 to 7 of 7

Macro for Dynamic Ranges

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Macro for Dynamic Ranges

    I end up making dynamic ranges in most workbooks, and tire of typing then in. The code below allows you to select a range and it makes dynamic ranges using the header row, for numbers or text, according to the contents of the cell below the header.

    Please Login or Register  to view this content.
    Here 'tis, hope you find it useful.
    Please Login or Register  to view this content.
    Last edited by shg; 09-28-2011 at 11:29 AM. Reason: delete spaces & NBS from names
    Entia non sunt multiplicanda sine necessitate

  2. #2
    Forum Contributor
    Join Date
    06-15-2011
    Location
    Chester, England
    MS-Off Ver
    Excel 2013
    Posts
    117

    Re: Macro for Dynamic Ranges

    Love this, it's a huge help. I can't figure out how to make the scope of the ranges cover the whole workbook - they are also greyed out when I try and edit them - is it possible?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro for Dynamic Ranges

    I added a prompt to let the user select workbook or worksheet scope.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    584

    Re: Macro for Dynamic Ranges

    Dear Sir,

    I am in need of such a macro. But the file extension is .bas

    How to apply in a common file and make use of the codes. Please guide us with a sample excel file.

    Please...
    Good friends are hard to find, harder to leave, and impossible to forget.

    acsishere.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro for Dynamic Ranges

    Put the bas file in a directory, open the VBE, and drag the file into the VBA project.

  6. #6
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    584

    Re: Macro for Dynamic Ranges

    Dear Sir,

    Thank you for your guidance.

  7. #7
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019, Microsoft 365.
    Posts
    440

    Re: Macro for Dynamic Ranges

    This macro is very cool. Well respected

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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