#1   Report Post  
Posted to microsoft.public.excel.misc
joeski
 
Posts: n/a
Default Excel GOTO

I need a GOTO macro. A number say "1001" is in cell A1. When I click on the
button, the macro references cell A1 and then takes the cursor to the cell
(in column A) that holds the value in A1.

joeski

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Excel GOTO

Put a button from the Forms toolbar on the sheet (near A1???) and assign it this
macro:

Option Explicit
Sub testme()

Dim res As Variant
Dim myRng As Range

With ActiveSheet
Set myRng = .Range("a2", .Cells(.Rows.Count, "A").End(xlUp))
res = Application.Match(.Range("a1").Value, myRng, 0)
If IsError(res) Then
Beep 'not found
Else
Application.Goto myRng(res) ', scroll:=True
End If
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

joeski wrote:

I need a GOTO macro. A number say "1001" is in cell A1. When I click on the
button, the macro references cell A1 and then takes the cursor to the cell
(in column A) that holds the value in A1.

joeski

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default Excel GOTO

One way (attach this macro to your button):

Public Sub MyGOTO()
Dim rFound As Range
Set rFound = Columns(1).Find( _
What:=Range("A1").Value, _
After:=Range("A1"), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
MatchCase:=False)
If Not rFound.Row = 1 Then _
rFound.Select
End Sub

In article ,
joeski wrote:

I need a GOTO macro. A number say "1001" is in cell A1. When I click on the
button, the macro references cell A1 and then takes the cursor to the cell
(in column A) that holds the value in A1.

joeski

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...=a7883949-0b41
-4694-8e22-e10c61c36bd1&dg=microsoft.public.excel.misc

  #4   Report Post  
Posted to microsoft.public.excel.misc
joeski
 
Posts: n/a
Default Excel GOTO

Thanks guys
--
joeski


"joeski" wrote:

I need a GOTO macro. A number say "1001" is in cell A1. When I click on the
button, the macro references cell A1 and then takes the cursor to the cell
(in column A) that holds the value in A1.

joeski

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
Open Excel 2003 from Windows Explorer pmpjr Excel Discussion (Misc queries) 9 September 11th 06 03:58 PM
convert pocket excel back to standard excel kevroyal Excel Discussion (Misc queries) 1 February 16th 06 11:35 AM
VBA for Excel 2000 file is corrupt nkamp Excel Discussion (Misc queries) 0 May 26th 05 03:37 PM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM


All times are GMT +1. The time now is 11:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"