Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
unhide menu bar in excel - just disappeared | Setting up and Configuration of Excel | |||
Open Excel 2003 from Windows Explorer | Excel Discussion (Misc queries) | |||
convert pocket excel back to standard excel | Excel Discussion (Misc queries) | |||
VBA for Excel 2000 file is corrupt | Excel Discussion (Misc queries) | |||
Excel 2002 and 2000 co-install. Control Which Starts ? | Excel Discussion (Misc queries) |