Thread: Cell Validation
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Cell Validation

On Wed, 8 May 2013 12:58:45 +0100, JLW SR wrote:


JLW SR;1611523 Wrote:
I am a novice any and all help will be greatly appreciated! I need to
provide a list of valid usernames for cell #1, then have the user enter
their password in cell #2. At this point I need to validate the entered
password in cell #2 against the another sheet containing the valid
usernames and passwords. If the password is correct they may continue
on, if the password is invalid they must re-enter the password until it
is valid.

I have been able to setup the List drop down box for the username, but
I am able to continue if I enter nothing, I need to have a name entered
from the list. Also I need to then have the user enter their password
into cell #2 and then using the username and password from cell #1 and
cell #2 verify the username and and password from another sheet using
data from column a (username) and coulmn b (password). How can I
accomplish this?
Thanks
JLW SR



Is no one able to answer my questions, can it be done?


You could use Data Validation

Here's one way.

Worksheet: UsernamePW
A1:An -- list of valid User Names with no blanks
B1:Bn -- list of corresponding passwords
(you probably will want to hide this sheet)
Define a name (to get around problem of Data Validation referring to another sheet:

Names refers to: =OFFSET(UsernamePW!$A$1,0,0,COUNTA(UsernamePW!$A:$ A))

Note that Names is a dynamic range, and you can add names to the list and the Names range will change accordingly.

On your Entry sheet, select A2
Data Validation
List
Source: =Names
set the input message and error alert messages however you wish

Select B2
Data Validation
Custom
Formula: =$B$2=VLOOKUP($A$2,OFFSET(Names,0,0,,2),2,FALSE)
Again, set the input and error alert messages to suit you.