+ Reply to Thread
Results 1 to 4 of 4

Remembering a cell location

  1. #1
    Registered User
    Join Date
    07-03-2008
    Location
    Scotland
    Posts
    58

    Remembering a cell location

    Hi guys,

    I was wondering if it is possible to tell a macro to remember a selected cell and to tell it to return to that cell later on in the macro.

    For example. On sheet 1, I select cell D4.

    The macro I run says to take the value of the cell 5 cells to the right, and to paste it into sheet 2, cell A1.

    I then want to tell it to go back to the original selected cell (sheet 1, D4), and take the value 3 cells to the left, copy it, and paste it into sheet 2, cell B1.

    Is there any way of naming and identifying a selected cell in a macro?

    Hope that makes sense.

    Cheers.

    Damien

  2. #2
    Registered User
    Join Date
    07-03-2008
    Location
    Scotland
    Posts
    58
    The word D'oh! comes to mind.

    Return to sheet 1, where the cell I have copied will still be highlighted. Tell it to go 5 cells to the left and I am back where I started.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Better still don't select any other cells.

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573
    Try:
    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)

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