+ Reply to Thread
Results 1 to 2 of 2

define range of cells based on values that appear on other cells

  1. #1
    Registered User
    Join Date
    05-23-2013
    Location
    Reading, England
    MS-Off Ver
    vpappasmet
    Posts
    1

    define range of cells based on values that appear on other cells

    Hi all,

    I have a spreadsheet with dates and numbers. Every day I need to select a range of cells (D1:D??) and convert them from values based on a vlookup to values only.
    I know I can use the
    Range("D1:D?")=Range("D1:D?").Values (or sth like this, I have noted that down at my office)
    My problem is this: the end of the range (i.e. 56 th row in D column) changes every day and I can calculate what the end of the range is and output it as a number in a cell, for instance today 23/5/2013 the range will be D1:D56. The value 56 is in a cell. Tomorrow, the value in that cell will be 57 and the range needs to be D1:D57. How can I reference this number in the cell in order to use in the range?

    Hope I didn't confuse you a lot.

    Cheers,
    Vasilis

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: define range of cells based on values that appear on other cells

    There are multiple ways to select the last used row in a column. One way is like this:

    Please Login or Register  to view this content.
    where dlastrow is an arbitrarily named variable.

    You would use that variable in your range function. Example:
    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)

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