Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Case Specific
? instr("enough tables and Chairs to seat 236", "chairs")
This returns 0 because I'm not using a capital "C" in chairs Is there a command to cause Excel to be non case-specific ? Thanks - Kirk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Case Specific
Try this:
instr(LCase("enough tables and Chairs to seat 236"), "chairs") Hopes this heps. --- Per "kirkm" skrev i meddelelsen ... ? instr("enough tables and Chairs to seat 236", "chairs") This returns 0 because I'm not using a capital "C" in chairs Is there a command to cause Excel to be non case-specific ? Thanks - Kirk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Case Specific
Try this
InStr(1, "enough tables and Chairs to seat 236", "chairs", 1) Mike "kirkm" wrote: ? instr("enough tables and Chairs to seat 236", "chairs") This returns 0 because I'm not using a capital "C" in chairs Is there a command to cause Excel to be non case-specific ? Thanks - Kirk |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Case Specific
Convert the text string and search string to the same case and then use Instr.
Lcase() for lower case Ucase() for upper case If this post helps click Yes --------------- Jacob Skaria "kirkm" wrote: ? instr("enough tables and Chairs to seat 236", "chairs") This returns 0 because I'm not using a capital "C" in chairs Is there a command to cause Excel to be non case-specific ? Thanks - Kirk |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Case Specific
Jacob,
You don't need to do that with instr, you can use the optional switch of 1 (VBTextCompare) and it ignores case. If you use the switch you have to specify the other optional start character. Mike "Jacob Skaria" wrote: Convert the text string and search string to the same case and then use Instr. Lcase() for lower case Ucase() for upper case If this post helps click Yes --------------- Jacob Skaria "kirkm" wrote: ? instr("enough tables and Chairs to seat 236", "chairs") This returns 0 because I'm not using a capital "C" in chairs Is there a command to cause Excel to be non case-specific ? Thanks - Kirk |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Case Specific
Thanks everyone. Figured it all out and learned something new. Cheers - Kirk |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Case Specific
Actually, I like using the built-in constant names rather than their
numerical equivalents (I find that makes the code more self-documenting)... InStr(1, "enough tables and Chairs to seat 236", "chairs", vbTextCompare) -- Rick (MVP - Excel) "Mike H" wrote in message ... Jacob, You don't need to do that with instr, you can use the optional switch of 1 (VBTextCompare) and it ignores case. If you use the switch you have to specify the other optional start character. Mike "Jacob Skaria" wrote: Convert the text string and search string to the same case and then use Instr. Lcase() for lower case Ucase() for upper case If this post helps click Yes --------------- Jacob Skaria "kirkm" wrote: ? instr("enough tables and Chairs to seat 236", "chairs") This returns 0 because I'm not using a capital "C" in chairs Is there a command to cause Excel to be non case-specific ? Thanks - Kirk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data Validation from a list - Always case specific? | Excel Discussion (Misc queries) | |||
Searching for case specific data | Excel Discussion (Misc queries) | |||
Searching for specific case | Excel Programming | |||
Case specific LOOKUP alternative | Excel Discussion (Misc queries) | |||
non case specific | Excel Programming |