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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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.
 
Upvote 0

Forum statistics

Threads
1,215,577
Messages
6,125,637
Members
449,242
Latest member
Mari_mariou

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