View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bill_S Bill_S is offline
external usenet poster
 
Posts: 30
Default VBA to find a value in a list

thank you Bob!


"Bob Phillips" wrote:

With Worksheets("Roster").Range("A1:A200")
On Error Resume Next
Set cell = .Find(pWord, LookIn:=xlValues)
On Error Goto 0
If Not cell Is Nothing Then
MsgBox "Name is " & cell.Offset(0, 1).Value
Else
MsgBox "Invalid password"
End If
End With

--
HTH

Bob Phillips

"Bill_S" wrote in message
...
My workbook prompts the user for his/her password via a macro using

InputBox.

password = InputBox("Please enter your password")

Once entered, I need a macro to find that password in the hidden "Roster"
sheet of 200 users and return the user's name that is located in the next
column over.