Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Case sensitive data

I am trying to perform a routine based on the value of a
cell. The value is case sensitive and I need it to
distinguish between "GBP" & "GBp" - Can these text strings
be distinguished in VBA?

Rgds
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Case sensitive data

Ian,

Use the StrComp function. This allows you to specify case-insensitive
comparisons.

If StrComp("GBP", "GBp", vbBinaryCompare) = 0 Then
Debug.Print "equal strings"
Else
Debug.Print "not equal strings"
End If


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


"Ian" wrote in message
...
I am trying to perform a routine based on the value of a
cell. The value is case sensitive and I need it to
distinguish between "GBP" & "GBp" - Can these text strings
be distinguished in VBA?

Rgds



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Case sensitive data

See the 'StrComp' function in VBE help. It allows for binary (case
sensitive) and textual comparisons.

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

I am trying to perform a routine based on the value of a
cell. The value is case sensitive and I need it to
distinguish between "GBP" & "GBp" - Can these text strings
be distinguished in VBA?

Rgds


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
countif function: how to distinguish case/make case sensitive mvwoolner Excel Worksheet Functions 3 March 18th 09 02:18 PM
How do I use case sensitive VLOOKUP? markythesk8erboi Excel Worksheet Functions 8 June 4th 08 04:44 PM
Case Sensitive LookUps carl Excel Worksheet Functions 1 April 3rd 08 04:03 PM
Validation ... Case Sensitive? Ken Excel Discussion (Misc queries) 2 November 16th 06 12:30 AM
Case Sensitive w/ IF jeffP Excel Worksheet Functions 11 February 6th 06 01:16 AM


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