Lookup macro

firedude

New Member
Joined
Jan 18, 2005
Messages
1
Help

I'm new to VB in Excel and I'm trying to create a lookup macro. I have several columns that are filled with data but I'm only concerned with two of them. I would like to create a macro where when I type the id number in a userform it will spit out the hours for the particular individual (Jon Doe). Plus I need to put this Userform on another sheet so all the users can't see eachothers hours. Any guidance is greatly appreciated..

Thanks,
Fried Brain in Glendale

Id # Name Hours
0001 Jon Doe 12
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

P Sitaram

Well-known Member
Joined
Jun 24, 2003
Messages
1,974
See below:
Book1
ABCDEF
1NameHoursNameHours
2JonDoe12SomeOne11
3SomeOne11
4OtherOne4
Sheet1


Cell F2 holds the formula:

=INDEX(B:B,MATCH(E2,A:A,0))

E1:F2 can be placed in another worksheet. The range references should contain the sheet name in that case.

Restricting people to their own data will be difficult. It will require some VBA and other preventive steps, to attain a reasonable level of security.
 

Forum statistics

Threads
1,148,525
Messages
5,747,194
Members
424,068
Latest member
Salim khamis

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
Top