Vlookup Macro

A

Ann

Dear whoever can help..

Is it possible to create a Macro for a VLookUp that I use
everyday or am I just being too damned lazy???

Ann
 
B

Bob Phillips

Ann,

Very simple. This code snippet creates a VLOOKUP that looks up the 3 value
in table H1:K100 for a lookup value in A1. Just adapt to suit

ActiveCell.Formula = "=VLOOKUP(A1,H1:K100,3,FALSE)"

You could easily create this as a macro and assign it to a toolbar button.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
D

Dave Peterson

I think you're being too lazy!

To make the macro general enough to reuse, I would think you'd have to pass it
the same info that =vlookup() needs.

On the other hand, if you're doing something everyday that is completely
repetitive, then maybe you could have your macro add the formula/formatting/and
all the other stuff, too.

There's a fine line between just regular lazy and too lazy!
 
Top