Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Case Sensitive Duplicates in Lists

A user is prompted for a 2 character code on a userform.
If the the code exists, the user is prompted for a differnent code.
The challenge is that AA is valid if Aa exists.

Using Exact and a Vlookup will not work given the vlookup returns the
first value it finds. this only works in the case where AA exists but
not aa. but when AA and aa are both in the list it no longer works.

thanks, ideally i'm looking for a vba solution.

Acceptable List
AA
Aa
aa
aA
BB

Unacceptable List
AA
AA
AA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Case Sensitive Duplicates in Lists

Posting your code or formula always helps readers
understand your problem better and will usually expedite a
response. With a formula, you could use:

=SUMPRODUCT(--(EXACT(J1,A1:A10)*ROW(INDIRECT("1:"&ROWS
(A1:A10)))))0

This will compare the value in J1 against the range A1:A10
and return a TRUE if the value already exists in the
range, FALSE if not.

It *is* case-sensitive.

HTH
Jason
Atlanta, GA

-----Original Message-----
A user is prompted for a 2 character code on a userform.
If the the code exists, the user is prompted for a

differnent code.
The challenge is that AA is valid if Aa exists.

Using Exact and a Vlookup will not work given the vlookup

returns the
first value it finds. this only works in the case where

AA exists but
not aa. but when AA and aa are both in the list it no

longer works.

thanks, ideally i'm looking for a vba solution.

Acceptable List
AA
Aa
aa
aA
BB

Unacceptable List
AA
AA
AA
.

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 function: how to distinguish case/make case sensitive mvwoolner Excel Worksheet Functions 3 March 18th 09 02:18 PM
Case Sensitive LookUps carl Excel Worksheet Functions 1 April 3rd 08 04:03 PM
Case Sensitive w/ IF jeffP Excel Worksheet Functions 11 February 6th 06 01:16 AM
Case sensitive vlookup Tawe Excel Discussion (Misc queries) 3 June 13th 05 03:43 PM
Case sensitive data Ian[_9_] Excel Programming 3 October 29th 03 06:16 PM


All times are GMT +1. The time now is 04:35 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"