VLOOKUP MACRO

  • Thread starter Thread starter JOHN YOUNG
  • Start date Start date
J

JOHN YOUNG

2 questions:

1st - in the vlookup formula is it possible to put a
formula in the lookup_value field instead of a cell
reference or text.

2nd - is there a vlookup macro or vb code available to
have a look at. I have had a search on the knowledge
base but cant seem to find one.

Kind regards

John Young
 
Hi John

1) Yes. Instead of
=VLOOKUP(A1,E4:F32,2,FALSE)
you could use
=VLOOKUP(17*2,E4:F32,2,FALSE)

2) Turn on your macro recorder, enter the vlookup formula and then and have
a look at the code. It should look something like..

Sub Test()
Range("B4").FormulaR1C1 = _
"=VLOOKUP(17*2,RC[3]:R[28]C[4],2,FALSE)"
End Sub

--
XL2002
Regards

William

(e-mail address removed)

| 2 questions:
|
| 1st - in the vlookup formula is it possible to put a
| formula in the lookup_value field instead of a cell
| reference or text.
|
| 2nd - is there a vlookup macro or vb code available to
| have a look at. I have had a search on the knowledge
| base but cant seem to find one.
|
| Kind regards
|
| John Young
 
JOHN YOUNG said:
2nd - is there a vlookup macro or vb code available to
have a look at. I have had a search on the knowledge
base but cant seem to find one.

Kind regards

John Young

Hi John, this is the vlookup code l use.. just something for you to
look at
in case it helps..

Application.WorksheetFunction.VLookup(ActiveSheet.Cells(xlrow,
39).Value, Range("br1385:bv1485"), 5, True)

seeya ste
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top