+ Reply to Thread
Results 1 to 9 of 9

activecell column to a given range

Hybrid View

  1. #1
    Peter Morris
    Guest

    activecell column to a given range

    I've recently started doing some Excel programming after a gap
    of about 4 years, I find I've forgotten a lot.

    What's the syntax for this? The activecell is in a given column.
    I want to go to the same column, but a different row, ie a particular
    row in a named range "Column_Headings"

    to put it another way, what I want to go is go to the column
    heading of whichever column I'm in at the moment.

    TIA



  2. #2
    Dave Peterson
    Guest

    Re: activecell column to a given range

    Activesheet.cells(1,activecell.column).Select
    or
    activecell.entirecolumn.cells(1).Select

    Peter Morris wrote:
    >
    > I've recently started doing some Excel programming after a gap
    > of about 4 years, I find I've forgotten a lot.
    >
    > What's the syntax for this? The activecell is in a given column.
    > I want to go to the same column, but a different row, ie a particular
    > row in a named range "Column_Headings"
    >
    > to put it another way, what I want to go is go to the column
    > heading of whichever column I'm in at the moment.
    >
    > TIA


    --

    Dave Peterson

  3. #3
    Peter Morris
    Guest

    Re: activecell column to a given range


    > Peter Morris wrote:
    >>
    >> I've recently started doing some Excel programming after a gap
    >> of about 4 years, I find I've forgotten a lot.
    >>
    >> What's the syntax for this? The activecell is in a given column.
    >> I want to go to the same column, but a different row, ie a particular
    >> row in a named range "Column_Headings"
    >>
    >> to put it another way, what I want to go is go to the column
    >> heading of whichever column I'm in at the moment.
    >>
    >> TIA



    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:44D2632B.D0C1A130@verizonXSPAM.net...
    > Activesheet.cells(1,activecell.column).Select
    > or
    > activecell.entirecolumn.cells(1).Select
    >



    No, the cell isn't neccesarily going to be in row 1.
    Its going to be above a particular column of figures
    but there may be stuff above it.



  4. #4
    Dave Peterson
    Guest

    Re: activecell column to a given range

    Do you know the row number to go to?

    Activesheet.cells(###,activecell.column).Select

    if you do, change ### to that row number.

    Peter Morris wrote:
    >
    > > Peter Morris wrote:
    > >>
    > >> I've recently started doing some Excel programming after a gap
    > >> of about 4 years, I find I've forgotten a lot.
    > >>
    > >> What's the syntax for this? The activecell is in a given column.
    > >> I want to go to the same column, but a different row, ie a particular
    > >> row in a named range "Column_Headings"
    > >>
    > >> to put it another way, what I want to go is go to the column
    > >> heading of whichever column I'm in at the moment.
    > >>
    > >> TIA

    >
    > "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > news:44D2632B.D0C1A130@verizonXSPAM.net...
    > > Activesheet.cells(1,activecell.column).Select
    > > or
    > > activecell.entirecolumn.cells(1).Select
    > >

    >
    > No, the cell isn't neccesarily going to be in row 1.
    > Its going to be above a particular column of figures
    > but there may be stuff above it.


    --

    Dave Peterson

  5. #5
    Peter Morris
    Guest

    Re: activecell column to a given range


    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:44D27168.8F8B4B7F@verizonXSPAM.net...
    > Do you know the row number to go to?



    No, that's the point.

    To be precise, I know the row number NOW, but
    as I develop my code Imight move the cells to a different
    location. I don't waant tohard code a specific row
    number.

    Cells in the row are a named range "column_headers"
    I want the current column within that range. Or an
    alternative way to do this.



  6. #6
    Dave Peterson
    Guest

    Re: activecell column to a given range

    Ahhhh. I missed that part.

    with activesheet
    .cells(.range("column_headers").row,activecell.column).Select
    end with




    Peter Morris wrote:
    >
    > "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > news:44D27168.8F8B4B7F@verizonXSPAM.net...
    > > Do you know the row number to go to?

    >
    > No, that's the point.
    >
    > To be precise, I know the row number NOW, but
    > as I develop my code Imight move the cells to a different
    > location. I don't waant tohard code a specific row
    > number.
    >
    > Cells in the row are a named range "column_headers"
    > I want the current column within that range. Or an
    > alternative way to do this.


    --

    Dave Peterson

+ 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