+ Reply to Thread
Results 1 to 6 of 6

define a cell range from variable values?

  1. #1
    Registered User
    Join Date
    10-03-2007
    Location
    Twin Cities, MN
    MS-Off Ver
    2003
    Posts
    83

    define a cell range from variable values?

    I have a range staring with cell "A5" and going to Column "K8+" that I need to copy. My issue is that the number of rows to copy will change. I have the number stored a variable "a" in my coding. how do I code this to work?

    Thanks in advance!
    Last edited by pingwin77; 07-22-2009 at 10:34 AM.

  2. #2
    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: define a cell range from variable values?

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: define a cell range from variable values?

    You could use
    Please Login or Register  to view this content.
    The current region is a range bounded by any combination of blank rows and blank columns.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    10-03-2007
    Location
    Twin Cities, MN
    MS-Off Ver
    2003
    Posts
    83

    Re: define a cell range from variable values?

    so then do I define "numRows" like the following:

    Please Login or Register  to view this content.

  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: define a cell range from variable values?

    You could. I just don't use a as a name for an integer (Byte, Integer, Long) variable.

  6. #6
    Registered User
    Join Date
    10-03-2007
    Location
    Twin Cities, MN
    MS-Off Ver
    2003
    Posts
    83

    SOLVED: define a cell range from variable values?

    Thanks! That was exactly what I needed!

+ 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