Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
joes
 
Posts: n/a
Default COUNTIF and automatic type conversion problem

Hello

I like to have an unique validation rule for a columen which contains
id's. I used a therefore simple rule with the build in function
"COUNTIF"
http://www.cpearson.com/excel/NoDupEntry.htm

i.e. "=COUNTIF(E:E;E2)=1"

My id's have the format "n.nn" i.e. "1.1", "1.2", "1.3" etc. and the
cell format is set to "text". The above rule works fine as long as I
have the following id's

"5.1"
"5.10"
"5.100"

The problem which I have now is that EXCEL seems to convert the value
before the COUNTIF is getting applied. It seems that it converst the
value into a number and this results not any more into an unique id.
So any idea's how I can suppress this automatic conversion? To chnage
the id format is not applciable because it is already used.

Many thanks for any suggestions.

regards
Mark Egloff

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Try this instead

=SUMPRODUCT(--($E$1:$E$1000=E2))=1

Note SP doesn't work on whole columns.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"joes" wrote in message
oups.com...
Hello

I like to have an unique validation rule for a columen which contains
id's. I used a therefore simple rule with the build in function
"COUNTIF"
http://www.cpearson.com/excel/NoDupEntry.htm

i.e. "=COUNTIF(E:E;E2)=1"

My id's have the format "n.nn" i.e. "1.1", "1.2", "1.3" etc. and the
cell format is set to "text". The above rule works fine as long as I
have the following id's

"5.1"
"5.10"
"5.100"

The problem which I have now is that EXCEL seems to convert the value
before the COUNTIF is getting applied. It seems that it converst the
value into a number and this results not any more into an unique id.
So any idea's how I can suppress this automatic conversion? To chnage
the id format is not applciable because it is already used.

Many thanks for any suggestions.

regards
Mark Egloff



  #3   Report Post  
joes
 
Posts: n/a
Default

Many thanks it works... great.

What I wonder is only why is it working with the "SUMPRODUCT" and not
with the "COUNTIF", does the "SUMPRODUCT" not do any type conversations
or is this beacuse this function does it calculate differently. If
someone could delight me what the calculation steps are above would
help. What means the "--" multiplication with itself?

regards
Mark

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
COUNTIF and automatic type conversion problem joes Excel Discussion (Misc queries) 2 July 25th 05 03:26 PM


All times are GMT +1. The time now is 11:30 PM.

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

About Us

"It's about Microsoft Excel"