Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find text in specific cell??
Hi,
I'm trying to write some code to determine if a specific cell contains some text and if the booleen statement is true run the function. I see the psuedo code something like below but are unsure of the syntax. The Cell(4,9) actually contains the text "The Street is ..." if Cell(4, 9) Contains "Street" then 'execute functions' End if Thanks Dewey |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find text in specific cell??
Give this a try.
If InStr(cell.Offset(0, -8), "Street") Then 'or using your example If Instr(Cell(4,9), "Street") Then 'execute functions -- Best wishes, Jim "Dewey" wrote: Hi, I'm trying to write some code to determine if a specific cell contains some text and if the booleen statement is true run the function. I see the psuedo code something like below but are unsure of the syntax. The Cell(4,9) actually contains the text "The Street is ..." if Cell(4, 9) Contains "Street" then 'execute functions' End if Thanks Dewey |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find text in specific cell??
Thanks Jim, worked perfectly!
Jim Jackson wrote: Give this a try. If InStr(cell.Offset(0, -8), "Street") Then 'or using your example If Instr(Cell(4,9), "Street") Then 'execute functions -- Best wishes, Jim "Dewey" wrote: Hi, I'm trying to write some code to determine if a specific cell contains some text and if the booleen statement is true run the function. I see the psuedo code something like below but are unsure of the syntax. The Cell(4,9) actually contains the text "The Street is ..." if Cell(4, 9) Contains "Street" then 'execute functions' End if Thanks Dewey |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find text in specific cell??
Glad to help.
-- Best wishes, Jim "Dewey" wrote: Thanks Jim, worked perfectly! Jim Jackson wrote: Give this a try. If InStr(cell.Offset(0, -8), "Street") Then 'or using your example If Instr(Cell(4,9), "Street") Then 'execute functions -- Best wishes, Jim "Dewey" wrote: Hi, I'm trying to write some code to determine if a specific cell contains some text and if the booleen statement is true run the function. I see the psuedo code something like below but are unsure of the syntax. The Cell(4,9) actually contains the text "The Street is ..." if Cell(4, 9) Contains "Street" then 'execute functions' End if Thanks Dewey |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Find Specific Text in a Text String | Excel Discussion (Misc queries) | |||
FIND SPECIFIC TEXT AND REPLACE IT | Excel Worksheet Functions | |||
find specific text and make cell highlighted | Excel Discussion (Misc queries) | |||
UDF code to find specific text in cell comments, then average cell values | Excel Programming | |||
can you find specific text in a string ignoring any other text | Excel Discussion (Misc queries) |