Vba code for vlookup

arunrana

New Member
Joined
Jun 17, 2014
Messages
2
Hi, I'm Beginner of VBA, pls help me create the VBA for VLOOKUP for following data.
I've Book1 having 2 sheets. Sheet1 having the raw data, I want to create VLOOKUP in sheet2 to culled out the data from sheet1.

Sheet1
A B C D E F
Emp no. Emp Name Designation Date of Joining Department City
122233 abc Manager 13-06-14 Production Delhi
122234 def Executive 12-01-13 Sales Mumbai
122235 ghi President 13-01-13 Marketing Kolkata
122236 jkl officer 14-01-13 Operation Chennai
122237 mno Manager 15-01-13 Research New Delhi
122238 pqr senior Manager 16-01-13 Legal Mumbai
122239 stu senior officer 17-01-13 Development Kolkata
122240 vwx officer 18-01-13 Sales Delhi

My requirement are here-under-
When I type employee no. in any cell of column A in sheet2, Emp. name, designation, date of Joining, Department and city should be populated in corresponding cell of column B, C, D, E and F respectively.

Pls also see that vlookup formula should be hidden. also note that data in sheet1 can be go upto 5000 rows.

Pls help me.....
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Emp no.


Emp NameDesignationDate of JoiningDepartmentCity
=IF(B2="","",INDEX(Sheet1!$A:$A,MATCH(B2,Sheet1!$B:$B,0)))ghi=IF(B2="","",VLOOKUP($B2,Sheet1!$B:$H,COLUMN(B1),FALSE))=IF(C2="","",VLOOKUP($B2,Sheet1!$B:$H,COLUMN(C1),FALSE))=IF(D2="","",VLOOKUP($B2,Sheet1!$B:$H,COLUMN(D1),FALSE))=IF(E2="","",VLOOKUP($B2,Sheet1!$B:$H,COLUMN(E1),FALSE))


<tbody>
</tbody>












Sorry I couldn't get my HTML to work

formulas are put into each cell except for the emloyee
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top