Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CONTAINS SPECIFIC TEXT OR NUMBER
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? -- D.S. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
CONTAINS SPECIFIC TEXT OR NUMBER
Thank you, I knew about the 'Left' function, I knew there was another and
couldn't remember what it was. Kept thinking it was some like 'contains'. 'Like' should work splendidly. Thanks again "JE McGimpsey" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search for number after specific text in string | Excel Worksheet Functions | |||
How can I replace text with a specific number? | Excel Discussion (Misc queries) | |||
Need to display a number when a specific text is entered | Excel Discussion (Misc queries) | |||
Count number of text values in a specific row | Excel Worksheet Functions | |||
Convert specific text to a corresponding number | Excel Discussion (Misc queries) |