LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,560
Default Find Cell in Named Range

I have one column of numbers, in three sections (B2:B30), B34:B44), (B48:B55)
that can have duplicate numbers.
I was using successfully code to find a number in column B and if found,
activate the hyperlink in Column A in the same row as the found number.
But, when I started getting duplicate numbers, my code bombed.
I know I need to create a RANGE for each section, but how do I need to
change my code to look at a particular section? I have one set of code for
each section. Here is the code I am working with for the second section - I
want it to only look at the RANGE for A34:A44, let's call the Range OHAC:

With wbkData.ActiveSheet
iOffice = .Range("J30")
End With

With wbkSum.Sheets(1)
Dim lastrow As Long, lastcol As Long, xV As Long, xR As Long, xC As Long
lastrow = .Cells(Rows.Count, 1).End(xlUp).Row
'get matching row
xC = 2
For xV = 1 To lastrow
If iOffice = .Cells(xV, 2) Then xR = xV
Next xV
If xR = 0 Then MsgBox "Franchise #: " & iOffice & " not found in Summary
Table"
End With
With wbkSum.Sheets(1)
If xR 0 Then Range("A" & xR).Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Application.CommandBars("Task Pane").Visible = False
End With

Thanks much!
 
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
VBA: find number of columns in named range? George[_3_] Excel Discussion (Misc queries) 3 April 30th 07 05:35 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
named cell range Marilyn Excel Worksheet Functions 2 March 13th 06 07:42 PM
How to find all formulas that used a certain named range Laurence Lombard Excel Discussion (Misc queries) 2 October 25th 05 08:15 AM
Getting a named range from a cell value Charles Woll Excel Worksheet Functions 2 February 25th 05 03:39 PM


All times are GMT +1. The time now is 01:22 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"