View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
brandyvine brandyvine is offline
external usenet poster
 
Posts: 3
Default macro to lookup value and open tab based on lookup value

That worked beautifully! Thank you very much!! brandyvine

"Bernie Deitrick" wrote:

brandyvine,

If the 'given row' is the active cell's row, this works. Change
ActiveCell.Row to any other valid row reference....

Worksheets(Application.VLookup(Cells(ActiveCell.Ro w, 9).Value, _
Worksheets("ValidationLists").Range("D2:E13"), 2, False)).Activate


Also, you don't need to activate a sheet to work on it....

HTH,
Bernie
MS Excel MVP


"brandyvine" wrote in message
...
I'm trying to figure out if its possible to write a macro that will take
the
value in column 9 of a given row (row will change) and lookup or match it
in
a table in a different worksheet named ValidationLists D2:E13, then based
on
the information obtained in the lookup open the corresponding tab which is
named the same and located in the same workbook. I'll then have it go on
to
make a copy of that tab and fill in additional information from the
original
row in the Input tab where it originally started.

I've worked only a little with macros and am just trying to learn a little
of VBA to enhance what I can do with them. Thanks for any suggestions or
direction.