+ Reply to Thread
Results 1 to 3 of 3

Offset from a variable column to a fixed column

  1. #1
    Kurt Barr
    Guest

    Offset from a variable column to a fixed column

    I'm trying to put together a macro that will take a value from one cell in a
    row, and then move it to another cell in the same row. The originating cell
    is going to vary, but the receiving cell is going to be in a constant column
    in the same row. I know about using offset to move over a specified number of
    cells, but I'm not certain as to how many cells I'm going to want to move
    over to get to the same column in each row that I work with. Is there a way
    to use offset to move into a constant column?

  2. #2
    Ardus Petus
    Guest

    Re: Offset from a variable column to a fixed column

    set rCell=Cells(Activecell.row,"B")

    will set rCell to same row as active cell, column B

    HTH
    --
    AP

    "Kurt Barr" <[email protected]> a écrit dans le message de
    news: [email protected]...
    > I'm trying to put together a macro that will take a value from one cell in
    > a
    > row, and then move it to another cell in the same row. The originating
    > cell
    > is going to vary, but the receiving cell is going to be in a constant
    > column
    > in the same row. I know about using offset to move over a specified number
    > of
    > cells, but I'm not certain as to how many cells I'm going to want to move
    > over to get to the same column in each row that I work with. Is there a
    > way
    > to use offset to move into a constant column?




  3. #3
    Kurt Barr
    Guest

    Re: Offset from a variable column to a fixed column

    Perfect!! That was just what I needed. Thanks!!

    "Ardus Petus" wrote:

    > set rCell=Cells(Activecell.row,"B")
    >
    > will set rCell to same row as active cell, column B
    >
    > HTH
    > --
    > AP
    >
    > "Kurt Barr" <[email protected]> a écrit dans le message de
    > news: [email protected]...
    > > I'm trying to put together a macro that will take a value from one cell in
    > > a
    > > row, and then move it to another cell in the same row. The originating
    > > cell
    > > is going to vary, but the receiving cell is going to be in a constant
    > > column
    > > in the same row. I know about using offset to move over a specified number
    > > of
    > > cells, but I'm not certain as to how many cells I'm going to want to move
    > > over to get to the same column in each row that I work with. Is there a
    > > way
    > > to use offset to move into a constant column?

    >
    >
    >


+ 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