Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

Go to button

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
Seamus2626
Asked:
Seamus2626
  • 2
  • 2
1 Solution
 
jppintoCommented:
This will scroll to cell B37:

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

jppinto

0
 
Seamus2626Author Commented:
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
 
jppintoCommented:
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
 
Rory ArchibaldCommented:
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
 
Seamus2626Author Commented:
That didnt quite work Jpinto, it only selected the column. Thanks Rorya

Cheers,
Seamus
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now