+ Reply to Thread
Results 1 to 4 of 4

Need to create named range but with variable range

  1. #1
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Need to create named range but with variable range

    Hello, I have a worksheet that imports data into a sheet on my main file. I have the following code to create the named range and it works fine. However the "Accounts by Contract Rep file that I import may expand or decrease in the number of rows needed so I would like to be able to make the last row (regardless of what row #) that contains data the end of the range. How can I do this? Thanks.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    06-24-2011
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: Need to create named range but with variable range

    If you could build a generic worksheet/s emphasizing what you would like to do (with non sensitive data) you will get a very timely response. The people on this forum are great!

  3. #3
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Need to create named range but with variable range

    What is that first line supposed to do?

    You could use this instead:

    Please Login or Register  to view this content.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  4. #4
    Registered User
    Join Date
    11-02-2007
    Posts
    29

    Re: Need to create named range but with variable range

    Thanks Davegugg!! I guess my first line was the attempt to select the range. But I see now that the it isn't needed. Your tweak works perfectly, thank you!!!

+ 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