...not case sensitive

M

malay_ko

what function should i use to be able to accept small letter a, an
capital letter A. I want it not to be case sensitive. pls help me. thi
is part of my school homework. thanks
 
M

Max

Think most functions are non case sensitive
(One exception is FIND)

Try this:

Put in A1: a, in B1: A

Now put in:

C1: =IF(A2=B2,1,0)
D1: =MATCH(B2,A2,0)
E1: =SEARCH(B2,A2)
F1: =FIND(B2,A2)

Except for FIND, which returns the #VALUE! error value
all the above will return "1" indicating the value_if_true
or the function's prescribed return for a match found

Unlike SEARCH, FIND is case-sensitive
 
D

David McRitchie

In addition to Max's reply:

Most Excel Worksheet Functions are not case sensitive.
Most VBA Function are case sensitive.

You posted to worksheet functions but perhaps your
question was really a programming related question (VBA).
One way to do a comparison in VBA would be to make
both either uppercase or lowercase.
IF UCASE(var1) = UCASE(var2) THEN

Some more information on VBA text comparisons
Text Comparison, Case Sensitivity (#compare)
http://www.mvps.org/dmcritchie/excel/proper.htm#compare
The following VBA comparison is faster than using UCASE or LCASE
MsgBox InStr(1, Range("A1").Value, "banana", vbTextCompare) > 0 'insensitive

also of interest for Worksheet Functions
http://www.mvps.org/dmcritchie/excel/strings.htm

You might also gain more insight by using Answer Wizard
tab in HELP both for Excel and later for VBA searching for
case sensitive
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top