+ Reply to Thread
Results 1 to 4 of 4

select a cell and the one next to it

  1. #1
    Donna S
    Guest

    select a cell and the one next to it

    I'm trying to select the cell below the one I'm in and the cell to the right
    of the one below where I am. I know how to select a cell below the cell I'm
    in by useing the ActiveCell.Offset(1,0).select but I don't know how to select
    the one to the right of it at the same time. Please help.



  2. #2
    Nick Hodge
    Guest

    Re: select a cell and the one next to it

    Donna

    How about

    Sub SelectOneBelowAndOneRight()
    ActiveCell.Resize(1, 2).Offset(1, 0).Select
    End Su

    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    www.nickhodge.co.uk
    nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS


    "Donna S" <DonnaS@discussions.microsoft.com> wrote in message
    news:A7EE4085-9AD3-4C7D-A216-813A45EA08CB@microsoft.com...
    > I'm trying to select the cell below the one I'm in and the cell to the
    > right
    > of the one below where I am. I know how to select a cell below the cell
    > I'm
    > in by useing the ActiveCell.Offset(1,0).select but I don't know how to
    > select
    > the one to the right of it at the same time. Please help.
    >
    >




  3. #3
    Gary''s Student
    Guest

    RE: select a cell and the one next to it

    Sub Macro()
    i = Selection.Row
    j = Selection.Column
    Range(Cells(i + 1, j), Cells(i + 1, j + 1)).Select
    End Sub

    --
    Gary's Student


    "Donna S" wrote:

    > I'm trying to select the cell below the one I'm in and the cell to the right
    > of the one below where I am. I know how to select a cell below the cell I'm
    > in by useing the ActiveCell.Offset(1,0).select but I don't know how to select
    > the one to the right of it at the same time. Please help.
    >
    >


  4. #4
    Earl Kiosterud
    Guest

    Re: select a cell and the one next to it

    Donna,

    Seems to me there's a cleaner way, but this seems to work:

    Cell1 = ActiveCell.Offset(1, 0).Address
    Cell2 = ActiveCell.Offset(0, 1).Address
    Range(Cell1 & "," & Cell2).Select

    Or you can combine them, though it is harder to debug:
    Range(ActiveCell.Offset(1, 0).Address & "," & ActiveCell.Offset(0,
    1).Address).Select

    Earl Kiosterud
    www.smokeylake.com

    "Donna S" <DonnaS@discussions.microsoft.com> wrote in message
    news:A7EE4085-9AD3-4C7D-A216-813A45EA08CB@microsoft.com...
    > I'm trying to select the cell below the one I'm in and the cell to the
    > right
    > of the one below where I am. I know how to select a cell below the cell
    > I'm
    > in by useing the ActiveCell.Offset(1,0).select but I don't know how to
    > select
    > the one to the right of it at the same time. Please help.
    >
    >




+ 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