Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default non case specific

my code reads:
if variable1 = "excluded" then
call abc
else
call def
end if

my problem is 'variable1' is typed in by users and can be 'Excluded',
'EXCLUDED', and other combinations of caps and lower case letters. I want
to include any and all combination of upper and lower case letters, as long
as the spelling is correct. I am sure there is something I can wrap around
'variable1', but I don't know it. Thanks, Mike Allen


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default non case specific

Check this out:

http://www.excel-vba.com/v-functions.htm
See the lcase section, should show you how.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default non case specific

There are options re case sensitivity set for the module via Option statements
at the top. The simplest solution to you current question is to use

If LCase$(Variable1) = "excluded" Then

On Fri, 21 Jan 2005 12:14:07 -0600, "mike allen"
wrote:

my code reads:
if variable1 = "excluded" then
call abc
else
call def
end if

my problem is 'variable1' is typed in by users and can be 'Excluded',
'EXCLUDED', and other combinations of caps and lower case letters. I want
to include any and all combination of upper and lower case letters, as long
as the spelling is correct. I am sure there is something I can wrap around
'variable1', but I don't know it. Thanks, Mike Allen


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default non case specific

As convention I always use Ucase but you could use lcase

if lcase(variable1) = "excluded" then

Chips web link gives you a lot more info on this kind of thing though... You
should take a look at it.

HTH

"mike allen" wrote:

my code reads:
if variable1 = "excluded" then
call abc
else
call def
end if

my problem is 'variable1' is typed in by users and can be 'Excluded',
'EXCLUDED', and other combinations of caps and lower case letters. I want
to include any and all combination of upper and lower case letters, as long
as the spelling is correct. I am sure there is something I can wrap around
'variable1', but I don't know it. Thanks, Mike Allen



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default non case specific

if lcase(variable1) = "excluded" then
call abc
else
call def
end if

--
Regards,
Tom Ogilvy



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
Data Validation from a list - Always case specific? Kevin Excel Discussion (Misc queries) 2 December 21st 07 09:35 PM
Searching for case specific data Colin Foster Excel Discussion (Misc queries) 4 October 9th 07 06:10 PM
Case specific LOOKUP alternative dan Excel Discussion (Misc queries) 4 June 5th 06 12:22 PM
Change the text from lower case to upper case in an Excel work boo dave01968 Excel Discussion (Misc queries) 2 December 9th 05 09:09 AM
VBA- Calendar Control Click Event W Specific Select Case requirements Mark[_23_] Excel Programming 0 September 12th 03 06:24 PM


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

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"