Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Compare Strings Question

There's a setting that you can use that makes text comparisons case insensitive.

Add
Option Compare Text
Right at the top of the module--outside any procedure.

Then you can just compa

if current = temp then

If case never matters for any procedure in that module, it's an easy fix.


"Sabo, Eric" wrote:

I have the following:

If current = temp then

End if

My problem is the following:

Current = Apple
temp = APPLE

How can I compare these two strings without the case involved. I want the
if statement to treat them as equal.

Thank,
Eric Sabo


--

Dave Peterson
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
Compare Strings dksaluki Excel Discussion (Misc queries) 4 October 18th 08 09:39 PM
Compare two strings andy62 Excel Worksheet Functions 8 September 6th 06 02:14 PM
Compare strings of data Hal Excel Programming 1 September 28th 05 04:50 PM
Compare the strings yangyh Excel Discussion (Misc queries) 3 September 8th 05 04:45 AM
VBA search and compare strings stuart Excel Programming 1 June 11th 04 01:00 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"