+ Reply to Thread
Results 1 to 5 of 5

Macro help to move around spreadsheet

  1. #1
    cindy
    Guest

    Macro help to move around spreadsheet

    I am writing a macro to be used on different spreadsheets. I need the
    keystrokes to program to go to the first empty cell in the leftmost column of
    the spreadsheet. Do you know the keystrokes that will work in a macro? I
    used the keystrokes on a spreadsheet that took me to A288, and then when I
    applied it in another spreadsheet it took me to A288, not the actually empty
    cell in the current spreadsheet. Can you help? Thanks, cm

  2. #2
    Jim Rech
    Guest

    Re: Macro help to move around spreadsheet

    Many ways to do that, here's one:

    Columns(1).SpecialCells(xlCellTypeBlanks).Cells(1).Select

    --
    Jim
    "cindy" <cindy@discussions.microsoft.com> wrote in message
    news:4A62FD1E-39AB-4AC4-B20D-CACB10B4D3D8@microsoft.com...
    |I am writing a macro to be used on different spreadsheets. I need the
    | keystrokes to program to go to the first empty cell in the leftmost column
    of
    | the spreadsheet. Do you know the keystrokes that will work in a macro? I
    | used the keystrokes on a spreadsheet that took me to A288, and then when I
    | applied it in another spreadsheet it took me to A288, not the actually
    empty
    | cell in the current spreadsheet. Can you help? Thanks, cm



  3. #3
    cindy
    Guest

    Re: Macro help to move around spreadsheet

    Thanks Jim - another ? - what if I need to move one up from that cell to cut
    and paste the last cell's contents down. Then I need to move to the right,
    one column at a time and add literals and formulas along the bottom. I
    appreciate your help, cindy

    "Jim Rech" wrote:

    > Many ways to do that, here's one:
    >
    > Columns(1).SpecialCells(xlCellTypeBlanks).Cells(1).Select
    >
    > --
    > Jim
    > "cindy" <cindy@discussions.microsoft.com> wrote in message
    > news:4A62FD1E-39AB-4AC4-B20D-CACB10B4D3D8@microsoft.com...
    > |I am writing a macro to be used on different spreadsheets. I need the
    > | keystrokes to program to go to the first empty cell in the leftmost column
    > of
    > | the spreadsheet. Do you know the keystrokes that will work in a macro? I
    > | used the keystrokes on a spreadsheet that took me to A288, and then when I
    > | applied it in another spreadsheet it took me to A288, not the actually
    > empty
    > | cell in the current spreadsheet. Can you help? Thanks, cm
    >
    >
    >


  4. #4
    Jim Rech
    Guest

    Re: Macro help to move around spreadsheet

    The Offset method is good for moving the active cell versus where it is:

    ActiveCell.Offset(1).Select

    move down one cell. -1 moves up. Check Offset in help for moving
    right/left.

    --
    Jim
    "cindy" <cindy@discussions.microsoft.com> wrote in message
    news:A5D39AC7-59C2-429A-A0AB-9E720F5B1336@microsoft.com...
    | Thanks Jim - another ? - what if I need to move one up from that cell to
    cut
    | and paste the last cell's contents down. Then I need to move to the
    right,
    | one column at a time and add literals and formulas along the bottom. I
    | appreciate your help, cindy
    |
    | "Jim Rech" wrote:
    |
    | > Many ways to do that, here's one:
    | >
    | > Columns(1).SpecialCells(xlCellTypeBlanks).Cells(1).Select
    | >
    | > --
    | > Jim
    | > "cindy" <cindy@discussions.microsoft.com> wrote in message
    | > news:4A62FD1E-39AB-4AC4-B20D-CACB10B4D3D8@microsoft.com...
    | > |I am writing a macro to be used on different spreadsheets. I need the
    | > | keystrokes to program to go to the first empty cell in the leftmost
    column
    | > of
    | > | the spreadsheet. Do you know the keystrokes that will work in a
    macro? I
    | > | used the keystrokes on a spreadsheet that took me to A288, and then
    when I
    | > | applied it in another spreadsheet it took me to A288, not the actually
    | > empty
    | > | cell in the current spreadsheet. Can you help? Thanks, cm
    | >
    | >
    | >



  5. #5
    cindy
    Guest

    Re: Macro help to move around spreadsheet

    Hi Jim, thanks that worked. Now I'm moving to the next column and I want to
    count the number of items in the column. The number of rows will vary from
    spreadsheet to spreadsheet. Thanks for your help, c

    "Jim Rech" wrote:

    > The Offset method is good for moving the active cell versus where it is:
    >
    > ActiveCell.Offset(1).Select
    >
    > move down one cell. -1 moves up. Check Offset in help for moving
    > right/left.
    >
    > --
    > Jim
    > "cindy" <cindy@discussions.microsoft.com> wrote in message
    > news:A5D39AC7-59C2-429A-A0AB-9E720F5B1336@microsoft.com...
    > | Thanks Jim - another ? - what if I need to move one up from that cell to
    > cut
    > | and paste the last cell's contents down. Then I need to move to the
    > right,
    > | one column at a time and add literals and formulas along the bottom. I
    > | appreciate your help, cindy
    > |
    > | "Jim Rech" wrote:
    > |
    > | > Many ways to do that, here's one:
    > | >
    > | > Columns(1).SpecialCells(xlCellTypeBlanks).Cells(1).Select
    > | >
    > | > --
    > | > Jim
    > | > "cindy" <cindy@discussions.microsoft.com> wrote in message
    > | > news:4A62FD1E-39AB-4AC4-B20D-CACB10B4D3D8@microsoft.com...
    > | > |I am writing a macro to be used on different spreadsheets. I need the
    > | > | keystrokes to program to go to the first empty cell in the leftmost
    > column
    > | > of
    > | > | the spreadsheet. Do you know the keystrokes that will work in a
    > macro? I
    > | > | used the keystrokes on a spreadsheet that took me to A288, and then
    > when I
    > | > | applied it in another spreadsheet it took me to A288, not the actually
    > | > empty
    > | > | cell in the current spreadsheet. Can you help? Thanks, cm
    > | >
    > | >
    > | >
    >
    >
    >


+ 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