Find a value a post data to another worksheet

L

Les Stout

Good Day,

I am using Vlook up's to look up a number or a name which is typed into
a cell, this then brings the values to the right of the given number in
the table, into cells on another work sheet. There are 11 columns of
data.
I would like to do this which VBA, is it possible ?


Les Stout
 
R

Ron de Bruin

Here is a simple example

Sub test()
mynum = Application.InputBox("Enter a number", Type:=1)
Sheets("Sheet2").Range("B1").Value = _
Application.WorksheetFunction.VLookup(mynum, Range("data"), 2)
End Sub
 

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

Top