LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Find defined Name in List, then Goto

Hello again
Still playing with several different codes. I thought I understood this one,
but I guess I was wrong.
This code selects the whole range ( $A$66:$A$2020) and not the Name found in
$A$4 ( defined as Supplier)
I've tried using the defined names as well as the cell addresses, nothing
worked so far.
It is suppose to look at $A$4, find that name in the range ( $A$66:$A$2020)
defined as ListSup, then go there so that you can select the Hyperlink next
to it and view certain certificates.




Sub ViewCert()

Dim rngToSearch As Range
Dim rngFound As Range
Dim wks As Worksheet

Set wks = ActiveSheet
Set rngToSearch = Worksheets("Certs").Range("$A$66:$A$2020")
Set rngFound = rngToSearch.Find("$A$4")

Application.Goto rngToSearch, True


End Sub

Also tried this code, but it gives me an error and I do not know if it is
the '.Value in the line:
myFind = Worksheets("Certs").Range("Supplier").Value
since it is not numeric, but text
??????
stumped€¦..

Any help is appreciated.Thanks

Sub TakeMeThere()
Dim myFind As Integer
Dim rng As Range
myFind = Worksheets("Certs").Range("Supplier").Value
Set rng = Worksheets("Certs").Range( _
"ListSup").Find(myFind, _
LookIn:=xlValues, Lookat:=xlWhole)

If Not rng Is Nothing Then
Application.Goto rng, True

Else
MsgBox myFind & " was not found"
End If

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Go to goto - FIND Teddy-B Excel Discussion (Misc queries) 1 October 15th 09 05:46 PM
On error from Find, GoTo E jlclyde Excel Discussion (Misc queries) 1 October 8th 08 08:03 PM
Goto or Find a Date in a Sheet Kev - Radio Man Excel Discussion (Misc queries) 1 March 28th 08 09:40 AM
find the last Fred and goto cell Steved Excel Worksheet Functions 6 October 11th 07 06:53 PM
Find then GoTo problem code ufo_pilot Excel Programming 4 December 19th 05 05:40 PM


All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"