Link to home
Start Free TrialLog in
Avatar of RobJanine
RobJanine

asked on

LOOK UP AND INSERT ON CHANGE

Hi Experts

In cell C3 on sheet "Sht 1 - Table 1" I need a formula or VBA code to look at cell C4 (numbers between 1 & 200) and based on that number look at sheet "Employees - Table 1" A2:A201 and match that number then insert into C3 the corrosponding name in that row in "Employees - Table 1" but from column B.  EG below:

SHEET "Sht 1 - Table 1"
       A            B                 C         D      E           F
1
2
3                              ROB DENNIS                BRETT GIFFORD
4                              3                                 5


SHEET "Employees - Table 1"
       A                  B
1      1          JOHN SMITH
2      2          JOHN SMITH JNR
3      3          ROB DENNIS
4      4          JOHN SMITH SNR
5      5          BRETT GIFFORD

So "ROB DENNIS" will be put into C3 based on the number in C4
and "BRETT GIFFORD" will be put into F3 based on the number in F4

and so on. I have this reocurring in different cells 100 times.
I dont know how to do this but guess it would be a change event in C4 that runs some code??

Cheers

Rob        
Avatar of RobJanine
RobJanine

ASKER

please note that on sheet "Employees - Table 1" the numbers in Column A (Employee ID numbers) may not be in order.
Avatar of pritamdutt
Please upload a worksheet with sample data..
Not a problem at all...

I reordered the employees table a bit to show you the order doesn't matter.
Type any number that also exists in the employees table into row 4 on the first sheet, and the correct name will appear in row 3 directly above.

Let me know if I've missed something here
 EE-Example.xlsx
ASKER CERTIFIED SOLUTION
Avatar of m4trix
m4trix
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thankyou....works great.....keep an eye out I have another question shortly but I think it may be quite hard.


Cheers and thanks again.

Rob
Thankyou