Macro help to move around spreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Many ways to do that, here's one:

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

--
Jim
|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
 
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
 
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
| 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
| > | > |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
| >
| >
| >
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top