+ Reply to Thread
Results 1 to 3 of 3

Change CURRENT CELL

  1. #1
    Registered User
    Join Date
    01-31-2012
    Location
    Fort Worth, TX
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Change CURRENT CELL

    After using the FIND command to locate a cell in a particular column, it is my understanding that the 'found' cell becomes the CURRENT CELL. How do I now cause the cell that is perhaps 4 columns to the left and on the same row as the found cell to become the CURRENT CELL?
    I've struggled....
    Last edited by bobptex; 01-31-2012 at 01:01 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Change CURRENT CELL

    Hi bobptex and welcome to the forum,

    VBA has lots of tools to deal with ranges.

    It will understand

    ActiveCell.Row and ActiveCell.Column and these will come back as numbers.
    Before you do your Find you could save the possition of your activecell, something like

    myrow = ActiveCell.Row
    mycol = ActiveCell.Column

    Then do your find and to get back do a

    Cells(myrow,mycol).select

    Does the above help?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Re: Change CURRENT CELL

    You may also find the OFFSET command of use.

    Please Login or Register  to view this content.
    would select the cell 4 to the left of the current cell.

    If you have used a FIND command, then just tag .OFFSET(0, -4) on the end (prior to any select or other action) and you will be referring to the cell 4 to the left:
    Please Login or Register  to view this content.
    Note - if the above doesn't find "Bob" you will get an error. You may need error trapping.

    Cheers, Rob.
    Last edited by rscsmith; 02-01-2012 at 06:20 PM.

+ 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