Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA: find number of columns in named range? | Excel Discussion (Misc queries) | |||
inserting a named range into new cells based on a named cell | Excel Discussion (Misc queries) | |||
named cell range | Excel Worksheet Functions | |||
How to find all formulas that used a certain named range | Excel Discussion (Misc queries) | |||
Getting a named range from a cell value | Excel Worksheet Functions |