Solved

Go to button

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

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 code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

776 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