Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Assuming that each Part Number has a unique Employee id then you don't need to use a macro if you don't want. Create a table with Part Number in column J and corresponding Employee in K. Sort in ascending order by Part Number. In your sheet, say your Part Number is input in column A and the Employee number you want to automatically fill is in column B. In B2. =VLOOKUP(A2,$J$1:$K$6,2,FALSE) This looks up the Part Number in A2 and compares it to the table you created and returns the corresponding Employee number from that table. For asthetic purposes, hide the columns containing your tables if you don't want them to be seen. You could also create the table in a separate worksheet altogether and hide that from view as well. In order to see the preceding zeros in your results (Employee Id = 001) format your cells as 000. Cheers, Steve -- SteveG ------------------------------------------------------------------------ SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571 View this thread: http://www.excelforum.com/showthread...hreadid=488714 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Editing a simple macro | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) |