ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Data Validation (https://www.excelbanter.com/excel-programming/313465-excel-data-validation.html)

Sue[_6_]

Excel Data Validation
 
Hi there

I wish to prevent certain values (eg: the words "Expenses", or "Exps")
from being entered into a cell...they can enter any other
description/words they like (up to say, 40 characters), I just don't
want them to be able to enter either of those mentioned above....how
do I do it? VBA?

The data validation function is just not cutting the mustard, but it
may be I'm overlooking something simple...?

thanks in advance - really appreciate any help
Sue

Dick Kusleika[_3_]

Excel Data Validation
 
Sue

You can use Data Validation. Choose the Custom option from the dropdown
and use a formula like this

=AND(A1<"Expenses",A1<"Exps")

assuming you're setting it up for A1. The AND function can take up to
thirty arguments if you need to add words later. Another option is a
formula like this

=LEFT(A1,3)<"Exp"

although that will flag a lot of words that you many not want to flag.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Sue" wrote in message
om...
Hi there

I wish to prevent certain values (eg: the words "Expenses", or "Exps")
from being entered into a cell...they can enter any other
description/words they like (up to say, 40 characters), I just don't
want them to be able to enter either of those mentioned above....how
do I do it? VBA?

The data validation function is just not cutting the mustard, but it
may be I'm overlooking something simple...?

thanks in advance - really appreciate any help
Sue




ijb[_2_]

Excel Data Validation
 
The sheet "OnChange" event fires whenever a cell value is changed. Some VBA
in there would allow you to block content.
If you need more info please reply to the group

--
If I've mis-understood the question please tell me.

HTH

ijb

Remove nospam from my e-mail address to talk direct

Not MCSD, MVP, TLA, P&P, PCMCIA, etc just trying to help


"Sue" wrote in message
om...
Hi there

I wish to prevent certain values (eg: the words "Expenses", or "Exps")
from being entered into a cell...they can enter any other
description/words they like (up to say, 40 characters), I just don't
want them to be able to enter either of those mentioned above....how
do I do it? VBA?

The data validation function is just not cutting the mustard, but it
may be I'm overlooking something simple...?

thanks in advance - really appreciate any help
Sue





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

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