+ Reply to Thread
Results 1 to 3 of 3

Range based on two variables

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    50

    Range based on two variables

    Hi,

    I can do a range based on one variable, as below:

    But what if I want the number 4 below to be the variable, x, how do I code this? Thanks.

    Please Login or Register  to view this content.
    Last edited by kinseld5; 09-21-2012 at 08:04 AM.

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Range based on two variables

    Hello
    Try amending your code to the following:

    Please Login or Register  to view this content.
    This selects the range B2:B8.

    Hope this helps.
    DBY

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,172

    Re: Range based on two variables

    Hi, kinseld5,

    either
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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