Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Data Validation

I thought I had this one figured out. I have a column containing either NOT
TAGGED or a unique series of characters.
I put this in the next column =IF(A2="NOT TAGGED", "NOT
TAGGED",COUNTIF($A$2:$A$500,A2),=1)
and it works great.

So I went to the column where I want the validation and the first cell. I
clicked on Data Validation (Excel 2007) thenSettings then picked Allow then
Custom and then in the formula bar put the formula above.

I got no error but it finds NOT TAGGED as a duplicate when it is entered in
a cell. If I use the countif part only it prevents duplicates. However, I
want to allow duplicates of NOT TAGGED and thought the IF statement should
take care of that (and it does if the formula is in the next column) but it
will not work using the Data Validation icon process.

Why?
--
Thank You
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Data Validation

I didn't put the < at the end of the countif; here is the formula I am using
=IF(A2="NOT TAGGED", "NOT TAGGED",COUNTIF($A$2:$A$500,A2),<=1)
--
Thank You


"HarryisTrying" wrote:

I thought I had this one figured out. I have a column containing either NOT
TAGGED or a unique series of characters.
I put this in the next column =IF(A2="NOT TAGGED", "NOT
TAGGED",COUNTIF($A$2:$A$500,A2),=1)
and it works great.

So I went to the column where I want the validation and the first cell. I
clicked on Data Validation (Excel 2007) thenSettings then picked Allow then
Custom and then in the formula bar put the formula above.

I got no error but it finds NOT TAGGED as a duplicate when it is entered in
a cell. If I use the countif part only it prevents duplicates. However, I
want to allow duplicates of NOT TAGGED and thought the IF statement should
take care of that (and it does if the formula is in the next column) but it
will not work using the Data Validation icon process.

Why?
--
Thank You

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Data Validation

Two comments;

First, you have too many parameters in your formula. The IF can only take
three parameters- you are splitting your third parameter with an unnecessary
comma.

Second, although I haven't tested this, I suspect that the validation
formula needs to return either a true or false value. If this is the case,
your formula might be something more like:

=IF(A2="NOT TAGGED",TRUE,COUNTIF($A$2:$A$500,A2)<=1)

HTH,
Keith

"HarryisTrying" wrote:

I didn't put the < at the end of the countif; here is the formula I am using
=IF(A2="NOT TAGGED", "NOT TAGGED",COUNTIF($A$2:$A$500,A2),<=1)
--
Thank You


"HarryisTrying" wrote:

I thought I had this one figured out. I have a column containing either NOT
TAGGED or a unique series of characters.
I put this in the next column =IF(A2="NOT TAGGED", "NOT
TAGGED",COUNTIF($A$2:$A$500,A2),=1)
and it works great.

So I went to the column where I want the validation and the first cell. I
clicked on Data Validation (Excel 2007) thenSettings then picked Allow then
Custom and then in the formula bar put the formula above.

I got no error but it finds NOT TAGGED as a duplicate when it is entered in
a cell. If I use the countif part only it prevents duplicates. However, I
want to allow duplicates of NOT TAGGED and thought the IF statement should
take care of that (and it does if the formula is in the next column) but it
will not work using the Data Validation icon process.

Why?
--
Thank You

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Data Validation

thanks for your thoughts. I am now trying to write a function or macro to do
the job.
--
Thank You


"ker_01" wrote:

Two comments;

First, you have too many parameters in your formula. The IF can only take
three parameters- you are splitting your third parameter with an unnecessary
comma.

Second, although I haven't tested this, I suspect that the validation
formula needs to return either a true or false value. If this is the case,
your formula might be something more like:

=IF(A2="NOT TAGGED",TRUE,COUNTIF($A$2:$A$500,A2)<=1)

HTH,
Keith

"HarryisTrying" wrote:

I didn't put the < at the end of the countif; here is the formula I am using
=IF(A2="NOT TAGGED", "NOT TAGGED",COUNTIF($A$2:$A$500,A2),<=1)
--
Thank You


"HarryisTrying" wrote:

I thought I had this one figured out. I have a column containing either NOT
TAGGED or a unique series of characters.
I put this in the next column =IF(A2="NOT TAGGED", "NOT
TAGGED",COUNTIF($A$2:$A$500,A2),=1)
and it works great.

So I went to the column where I want the validation and the first cell. I
clicked on Data Validation (Excel 2007) thenSettings then picked Allow then
Custom and then in the formula bar put the formula above.

I got no error but it finds NOT TAGGED as a duplicate when it is entered in
a cell. If I use the countif part only it prevents duplicates. However, I
want to allow duplicates of NOT TAGGED and thought the IF statement should
take care of that (and it does if the formula is in the next column) but it
will not work using the Data Validation icon process.

Why?
--
Thank You

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Data Validation

I figured it out. Here is the correct formula
=if(a2="not tagged",TRUE,countif($a$2:$a$2000,a2)<=1)

I had Not Tagged repeated but should have put TRUE there so if it found a
Not Tagged it would evaluate to true.
--
Thank You


"ker_01" wrote:

Two comments;

First, you have too many parameters in your formula. The IF can only take
three parameters- you are splitting your third parameter with an unnecessary
comma.

Second, although I haven't tested this, I suspect that the validation
formula needs to return either a true or false value. If this is the case,
your formula might be something more like:

=IF(A2="NOT TAGGED",TRUE,COUNTIF($A$2:$A$500,A2)<=1)

HTH,
Keith

"HarryisTrying" wrote:

I didn't put the < at the end of the countif; here is the formula I am using
=IF(A2="NOT TAGGED", "NOT TAGGED",COUNTIF($A$2:$A$500,A2),<=1)
--
Thank You


"HarryisTrying" wrote:

I thought I had this one figured out. I have a column containing either NOT
TAGGED or a unique series of characters.
I put this in the next column =IF(A2="NOT TAGGED", "NOT
TAGGED",COUNTIF($A$2:$A$500,A2),=1)
and it works great.

So I went to the column where I want the validation and the first cell. I
clicked on Data Validation (Excel 2007) thenSettings then picked Allow then
Custom and then in the formula bar put the formula above.

I got no error but it finds NOT TAGGED as a duplicate when it is entered in
a cell. If I use the countif part only it prevents duplicates. However, I
want to allow duplicates of NOT TAGGED and thought the IF statement should
take care of that (and it does if the formula is in the next column) but it
will not work using the Data Validation icon process.

Why?
--
Thank You



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom data validation on cells with data validation values AKrobbins Excel Worksheet Functions 2 June 21st 11 04:20 PM
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Programming 0 November 7th 06 12:54 PM


All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"