Solved

Go to button

Posted on 2011-02-14
5
170 Views
Last Modified: 2012-05-11
Hi, im looking for a sub that i can assign a macro too and when pressed the user will be directed to a cell

On the attached ss, in Column B there are cells that have "Double Div" What code would allow a user to be bought directly to that cell from the tope of the worksheet?

Thanks
Seamus
CP-Report.zip
0
Comment
Question by:Seamus2626
  • 2
  • 2
5 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 34886819
This will scroll to cell B37:

Range("B37").Select
ActiveWindow.ScrollRow = Selection.Row
ActiveWindow.ScrollColumn = Selection.Column

jppinto

0
 

Author Comment

by:Seamus2626
ID: 34886842
Thanks jppinto but the location will vary so i somehow need the code to read the "Double Div" and bring me there

Thanks
Seamus
0
 
LVL 33

Expert Comment

by:jppinto
ID: 34886870
Range("B:B").Select
Selection.Find(What:="Double Div", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=True, SearchFormat:=False).Activate
ActiveWindow.ScrollRow = Selection.Row
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 34886873
For example:
Sub GotoDoubleDiv()
   Dim rng As Range
   Set rng = Sheets("Output").Range("B:B").Find(what:="Double Div", LookIn:=xlValues, lookat:=xlWhole, MatchCase:=False)
   If Not rng Is Nothing Then Application.Goto rng, True
End Sub

Open in new window

0
 

Author Closing Comment

by:Seamus2626
ID: 34886908
That didnt quite work Jpinto, it only selected the column. Thanks Rorya

Cheers,
Seamus
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now