+ Reply to Thread
Results 1 to 3 of 3

Using variables in range columns

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    23

    Using variables in range columns

    This should be pretty simple, I'm just struggling with it:

    So I'm trying to make a loop that takes all of the values in column "x" and creates a named array with the value in x1. I'm running into trouble with using the variable x as a means of defining the column in the range. Advice?

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    06-06-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Using variables in range columns

    Got it, if anyone runs into a similar problem the solution is:

    Please Login or Register  to view this content.

  3. #3
    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
    44,086

    Re: Using variables in range columns

    Instead of Range use Cells:

    Please Login or Register  to view this content.

    becomes:

    Please Login or Register  to view this content.

    that assumes that x is referring to a row. If it's a column:


    Please Login or Register  to view this content.


    Regards, TMS
    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


+ 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