+ Reply to Thread
Results 1 to 5 of 5

Dim Dynamic Cell Address

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Dim Dynamic Cell Address

    Hi --

    I believe/hope this is a simple ask.

    I want to set a cell address as a variable, lets call it 'xxCell'. I'm hoping to loop my code so that right before the loop, it activates 'xxCell' then offsets by 1, then defines the new active cell as 'xxCell' and so on/so forth (there will code running between each new defintion of 'xxCell').

    I'm good on the offsetting and defining. I'm just having trouble being able to return to a cell that has been defined as the 'xxCell' cell

    I hope that was clear enough

    Thanks!

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Dim Dynamic Cell Address

    Do you mean something like this?

    Please Login or Register  to view this content.
    Last edited by ImranBhatti; 08-23-2018 at 12:59 PM. Reason: Edited code after testing.
    Teach me Excel VBA

  3. #3
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Dim Dynamic Cell Address

    Quote Originally Posted by ImranBhatti View Post
    Do you mean something like this?

    Please Login or Register  to view this content.
    this works!!

    for posterity, this simplified version is what i was looking for:

    Dim xxCell As Range
    Range("A1").Activate
    Set xxCell = Selection

    Thanks!

  4. #4
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Dim Dynamic Cell Address

    If you think someone has helped you, please click on the star * button on the bottom left side of the helper's post and add some reputation to say thanks

  5. #5
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Dim Dynamic Cell Address

    Glad to have helped.

    Thanks for the rep+

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Dynamic Cell Address on MouseOver
    By Wasperine in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-02-2017, 04:43 AM
  2. I Want to know how I can make this formula into vba code for dynamic cell address
    By dgdgdg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-06-2013, 02:41 PM
  3. [SOLVED] I Want to know how I can make this formula into vba code for dynamic cell address
    By dgdgdg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2013, 12:54 PM
  4. Dynamic flexible cell address
    By dewsbury in forum Excel General
    Replies: 2
    Last Post: 03-09-2006, 04:10 PM
  5. ADDRESS function - dynamic input cell
    By claytorm in forum Excel General
    Replies: 1
    Last Post: 06-28-2005, 09:05 AM
  6. Goto a dynamic cell address within a macro
    By blkane in forum Excel General
    Replies: 3
    Last Post: 06-08-2005, 03:05 PM
  7. Goto a dynamic cell address within a macro
    By blkane in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2005, 02:05 PM

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