Ideas on how to restrict a entry

  • Thread starter Thread starter Alexandra
  • Start date Start date
A

Alexandra

How can I restrict someone from typing a dash?
For example entry should be 16F not 16-F

Or how can I make my COUNTIF formula to count either entry with or without
dash?

Thanks, Alexandra
 
Hi Alexandra

Spreadsheet cells are close to useless when it comes to rejecting entries. A
testbox on a userform can do this.

Try
=Countif(range, "16F")+Countif(range,"16-F")

HTH. Best wishes Harald
 
Hi Alexandra

Spreadsheet cells are close to useless when it comes to rejecting entries. A
testbox on a userform can do this.

Try
=Countif(range, "16F")+Countif(range,"16-F")

HTH. Best wishes Harald
 
Thanks it worked!

Harald Staff said:
Hi Alexandra

Spreadsheet cells are close to useless when it comes to rejecting entries. A
testbox on a userform can do this.

Try
=Countif(range, "16F")+Countif(range,"16-F")

HTH. Best wishes Harald
 
Thanks it worked!

Harald Staff said:
Hi Alexandra

Spreadsheet cells are close to useless when it comes to rejecting entries. A
testbox on a userform can do this.

Try
=Countif(range, "16F")+Countif(range,"16-F")

HTH. Best wishes Harald
 
You can use Data Validation to do this. Select the cell in which a
dash must not be entered. Then, go to the Data menu and choose
Validation. There, select "Custom" from the Allow list and enter the
following formula

=ISERROR(FIND("-",A1))

Change the A1 to the cell being validated.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
You can use Data Validation to do this. Select the cell in which a
dash must not be entered. Then, go to the Data menu and choose
Validation. There, select "Custom" from the Allow list and enter the
following formula

=ISERROR(FIND("-",A1))

Change the A1 to the cell being validated.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top