Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2007

Tip: Looking for answers? Try searching our database.

How to Execute a Macro to Go to one row down after GOTO command

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gebo - 08 Jun 2007 03:58 GMT
Simple Macro which take me to the last cell on a tab sheet titled "Personal".
This is a database that I can add names and telephone numbers.  The macro
ends with my cursor on the last cell of a the two column worksheet (Column A
& B) which in this  case is column B.  I want to complete the macro execution
by telling the cursor to go down 1 and left 1 or left 1 and down 1.  I want
to the cursor to point to next line blank line as I repeat the process as I
add names and tel #'s.

Thanks,
===========  See script below=======

Sub AddName()
'
' AddName Macro
' Macro recorded 6/6/2007 by George
'
   Range("D19").Select
   Sheets("Personal").Select
   Range("A1").Select
   Selection.SpecialCells(xlCellTypeLastCell).Select
   ActiveCell.SpecialCells
   End Sub

Signature

Gebo

Gebo - 08 Jun 2007 08:34 GMT
The script should be the following and the one that I posted in my inqury:

Range("D19").Select
   Sheets("Personal").Select
   Selection.SpecialCells(xlCellTypeLastCell).Select
Signature

Gebo

> Simple Macro which take me to the last cell on a tab sheet titled "Personal".
>  This is a database that I can add names and telephone numbers.  The macro
[quoted text clipped - 18 lines]
>     ActiveCell.SpecialCells
>     End Sub
Earl Kiosterud - 10 Jun 2007 17:26 GMT
Gebo,

Some comments.  You wrote:

> Range("D19").Select
>    Sheets("Personal").Select
>    Selection.SpecialCells(xlCellTypeLastCell).Select

This will use the current selection in sheet Personal, not necessarily D19, if another sheet
was .active while the Range("D19").Select was executed.

FSt1 wrote:

> Range("A65000").end(xlup).offset(1,0).select

This will look upwards from A65000, ignoring anything that might be in column B.

Another possibility.  This will look for stuff in columns A and B, but will be confounded by
anything that might be in column C adjacent to your stuff:

Range("A1").SpecialCells(xlCellTypeLastCell).Offset(1, -1).Select

If there is stuff in column C, you can insert a column between B and C (and hide it if you
want).

Signature

Earl Kiosterud
www.smokeylake.com

   Note: Some folks prefer bottom-posting.
   But if you bottom-post to a reply that's
   already top-posted, the thread gets messy.
   When in Rome...
-----------------------------------------------------------------------

> The script should be the following and the one that I posted in my inqury:
>
[quoted text clipped - 24 lines]
>>     ActiveCell.SpecialCells
>>     End Sub
FSt1 - 08 Jun 2007 08:37 GMT
hi
Sub AddName()
Sheets("Personal").Select
Range("A65000").end(xlup).offset(1,0).select
end sub

regards
FSt1

> Simple Macro which take me to the last cell on a tab sheet titled "Personal".
>  This is a database that I can add names and telephone numbers.  The macro
[quoted text clipped - 18 lines]
>     ActiveCell.SpecialCells
>     End Sub
Gebo - 08 Jun 2007 09:07 GMT
Thanks FST1.....   as soon as I did the cut and past and save the data and
then executed the macro.... it took me right to the row with the blank cell.
Signature

Gebo

> hi
> Sub AddName()
[quoted text clipped - 27 lines]
> >     ActiveCell.SpecialCells
> >     End Sub

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.