Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
countif function: how to distinguish case/make case sensitive | Excel Worksheet Functions | |||
How do I use case sensitive VLOOKUP? | Excel Worksheet Functions | |||
Case Sensitive LookUps | Excel Worksheet Functions | |||
Validation ... Case Sensitive? | Excel Discussion (Misc queries) | |||
Case Sensitive w/ IF | Excel Worksheet Functions |