I have a vlookup formula in a spreadsheet that returns a range name,
either "Top" or "Bottom". (These are defined ranges in the
spreadsheet.) I would like to write VBA to select the range returned
by this vlookup.
Thank you.
I have a vlookup formula in a spreadsheet that returns a range name,
either "Top" or "Bottom". (These are defined ranges in the
spreadsheet.) I would like to write VBA to select the range returned
by this vlookup.
Thank you.
Try something along the lines of
Dim S As Variant
On Error Resume Next
S = Application.VLookup(Range("A1"), Range("B1:C2"), 2, False)
If IsError(S) = False Then
Range(S).Select
Else
' not found
End If
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"JG Scott" <[email protected]> wrote in message
news:[email protected]...
>I have a vlookup formula in a spreadsheet that returns a range
>name,
> either "Top" or "Bottom". (These are defined ranges in the
> spreadsheet.) I would like to write VBA to select the range
> returned
> by this vlookup.
>
> Thank you.
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks