+ Reply to Thread
Results 1 to 4 of 4

Macro to create a Dynamic named range.

  1. #1
    Forum Contributor
    Join Date
    02-22-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    108

    Angry Macro to create a Dynamic named range.

    Hi all,

    I need a macro to create a Dynamic named range and I don't now where to start?

    I have a userform that run a report on filter data therefore the amount of data on the report will change according to the filtered data. After the report has been generated a macro needs to run to make a dynamic named range for Column C row 7 going down and call it TotalTime thereafter i will have a code that will SUM the TotalTime.

    Can anyone please assist me with the macro code?

    Thanks,

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Macro to create a Dynamic named range.

    why do you need a macro to do this?
    are you creating a new sheet first for this data to be added?
    why not already create the dynamic range and name it, then add the data on each empty row in column C and the range will expand. Thats what a dynamic range does.
    Remember you can only have one range name the same in a workbook or else you will get errors.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Forum Contributor
    Join Date
    02-22-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: Macro to create a Dynamic named range.

    Sean,

    Every time a run the report it goes on a new workbook and then from there i need the named range so that i can add formulas and make a chart ect.

    This will be basically on click and the users should be able to send the customer a report with the correct data.

  4. #4
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Macro to create a Dynamic named range.

    Hi try this

    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)

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