ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Ideas on how to restrict a entry (https://www.excelbanter.com/excel-discussion-misc-queries/232220-ideas-how-restrict-entry.html)

Alexandra

Ideas on how to restrict a entry
 
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

Rick Rothstein

Ideas on how to restrict a entry
 
Can you show us your COUNTIF formula?

--
Rick (MVP - Excel)


"Alexandra" wrote in message
...
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



Harald Staff[_2_]

Ideas on how to restrict a entry
 
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



"Alexandra" wrote in message
...
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



Alexandra

Ideas on how to restrict a entry
 
It is =countif(a1:a200,"16F")

"Rick Rothstein" wrote:

Can you show us your COUNTIF formula?

--
Rick (MVP - Excel)


"Alexandra" wrote in message
...
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




Alexandra

Ideas on how to restrict a entry
 
Thanks it worked!

"Harald Staff" wrote:

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



"Alexandra" wrote in message
...
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




Harald Staff[_2_]

Ideas on how to restrict a entry
 

"Alexandra" wrote in message
...
Thanks it worked!


Cool :-)


Chip Pearson

Ideas on how to restrict a entry
 

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)





On Thu, 28 May 2009 09:44:02 -0700, Alexandra
wrote:

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



All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com