+ Reply to Thread
Results 1 to 2 of 2

VBA relative cell

  1. #1
    Registered User
    Join Date
    11-10-2010
    Location
    Cape Town, South Africa
    MS-Off Ver
    M365 2209
    Posts
    22

    VBA relative cell

    In VBA can one refer to a relative cell, as opposed to an absolute. In other words, instead of specifying , say A1, you specify A1 modified by the value in cell V1, which may be 5, aking the required cell A6.
    Last edited by jackson7249; 11-25-2010 at 09:09 AM. Reason: Invalid request

  2. #2
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: VBA relative cell

    Hmmm... if you had a 5 in cell V1 and wanted to get to A6 you could use something like this in your vba code...

    Please Login or Register  to view this content.
    Not sure that's truly "relative" though, as we've hard coded the reference to cell V1. Depending on the charaters of that specific cell (like it's the last used column, first row), more flexible code can be used....

+ 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