Find text in specific cell??

  • Thread starter Thread starter Dewey
  • Start date Start date
D

Dewey

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
 
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
 
Thanks Jim, worked perfectly!

Jim said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top