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: 183
Default select a cell following vlookup

I am trying to find a value and then select the cell found.
the following does not work because of "range(res).select"
any idea? Thanks
(I am not using the Find function because the range "table" includes
functions)

Dim res As Variant
Dim table As Range
Dim myVal As Range
Set myVal = Range("LastQTR")
Set table = Range("table")

res = Application.HLookup(myVal, table, 2, False)
If IsError(res) Then
MsgBox "not found"
Else
range(res).select

End If
--
caroline
 
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: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
Vlookup+ Select Next Earliest Value (Array formula?) [email protected] Excel Worksheet Functions 1 November 6th 07 03:59 AM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
Select Range found by Vlookup JG Scott Excel Programming 1 April 18th 06 06:04 PM
VLOOKUP? Need to have value returned when select from drop-down list Budamon Excel Worksheet Functions 2 November 13th 05 09:05 PM


All times are GMT +1. The time now is 04:05 AM.

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"