Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Question about comparing mixed case string values

What is the command that tells VBA to treat uppercase and lowercase
characters as the same?

TIA.

-gk-


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Question about comparing mixed case string values

At the top of the module, use

Option Compare Text

This will cause all text comparisons to be case insensitive.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"TBA" wrote in message
...
What is the command that tells VBA to treat uppercase and

lowercase
characters as the same?

TIA.

-gk-




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default Question about comparing mixed case string values

What do you mean by "treat" them the same? What do want Excel to do? HTH
Otto
"TBA" wrote in message
...
What is the command that tells VBA to treat uppercase and lowercase
characters as the same?

TIA.

-gk-




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Question about comparing mixed case string values

Either upshift them

UpCase(Range("A1").Value)

or downshift them

LCase(Range("A1").Value)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"TBA" wrote in message
...
What is the command that tells VBA to treat uppercase and lowercase
characters as the same?

TIA.

-gk-




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Question about comparing mixed case string values

As stated,
Option Compare Text

answers the question asked, but you might not need it.
Also look in VBA help at the strcomp function.

--
Regards,
Tom Ogilvy


TBA wrote in message
...
What is the command that tells VBA to treat uppercase and lowercase
characters as the same?

TIA.

-gk-




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
Need to Change Case from Mixed to Caps Kathy[_3_] Excel Discussion (Misc queries) 7 April 7th 10 02:22 PM
How to change mixed case to upper case in Excel for all cells WordAlone Network Excel Discussion (Misc queries) 7 May 30th 07 05:53 AM
Question about comparing 2 cell values mCassidy Excel Discussion (Misc queries) 3 May 16th 07 09:37 PM
Comparing Sheets while ignoring Case. Andy Tallent Excel Discussion (Misc queries) 2 October 17th 05 04:15 PM
Problem with copying variable(s) to cell(s) and converting strings to mixed case Don Glass Excel Programming 4 August 17th 03 09:46 PM


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