Solved

Go to button

Posted on 2011-02-14
5
193 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

685 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