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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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,029
Messages
6,122,755
Members
449,094
Latest member
dsharae57

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