CONTAINS SPECIFIC TEXT OR NUMBER
One way:
Dim bCheck As Boolean
bCheck = Range("A1").Text Like "Check*"
another:
Dim bCheck As Boolean
bCheck = Left(Range("A1").Text, 5) = "Check"
note these are case sensitive. To make them case insensitive, you can do
something like:
Dim bCheck As Boolean
bCheck = UCase(Range("A1").Text) Like "CHECK*"
In article ,
"D.S." wrote:
Is there a way to test a cell for a specific text or number? Lets say a cell
contents of cell A1 begins with the word <Check, how would I test for that?
|