PDA

View Full Version : [SOLVED] vlookup help needed



razlevav
06-05-2014, 02:46 AM
hey to everyone

i need your help!!!!:)

i have a running macro that give the user to enter a customer number and copy it to the less row in another table
now i want that the macro will give the coulm next to it a vlookup to find the name of the customer from another table in a diffrent sheet.
for exmple - it put the given number in cell a541 and i want it to give the vlookup in cel b541

plz help me!!!
raz

Bob Phillips
06-05-2014, 02:51 AM
Lookup where, look into which column?

razlevav
06-05-2014, 03:45 AM
Lookup where, look into which column?

i ment vlookup function

as i said...
my macro takes the enterd number and copy it to the last row in a table.
for exmple - to cell a540
now i want to put a vlookup to cell b540 refering to the number from cell a540 and regerding to a table in sheet1 cells a1 to c700

ashleyuk1984
06-06-2014, 06:47 AM
You'll want something like this.


Range("B" & Rows.Count).End(xlUp).Offset(1, 0).Value = WorksheetFunction.VLookup(Range("A" & Rows.Count).End(xlUp).Value, Sheets("Sheet1").Range("A1:C700"), 2, 0)

Amend accordingly.