+ Reply to Thread
Results 1 to 3 of 3

Assign a variable a cell number based off off another variable that is assigned a cell num

  1. #1
    Forum Contributor
    Join Date
    07-03-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    139

    Assign a variable a cell number based off off another variable that is assigned a cell num

    I have a variable that gets assigned a cell number in VBA via the activecell.address. I have another variable that needs to be the same column as the first variable, BUT 1 row down.

    For example if Variable1 = M3, I need Variable2 to be M4. I have tried a number of ways, but coming up with nothing that works.

    Any thoughts, current code below where variable1 (Vnd) is getting it's value, variable2 name is StC... not shown in code because I have not had any luck with getting it to work so that StC would Equal M4 (in this case)

    This code will be used in a number of different workbooks, so the M column will not always be the same in every book.

    Please Login or Register  to view this content.
    Thank You.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Assign a variable a cell number based off off another variable that is assigned a cell

    Like this?
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-03-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Assign a variable a cell number based off off another variable that is assigned a cell

    Thank you Kyle, I added the (false, false) to get rid of the $ absolute values and it works fine, I apprec.

    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