Solved

Go to button

Posted on 2011-02-14
5
159 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
Comment Utility
This will scroll to cell B37:

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

jppinto

0
 

Author Comment

by:Seamus2626
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
That didnt quite work Jpinto, it only selected the column. Thanks Rorya

Cheers,
Seamus
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
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…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

743 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

18 Experts available now in Live!

Get 1:1 Help Now