Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Find Specific Text in a Text String Confused_in_Houston[_2_] Excel Discussion (Misc queries) 2 January 26th 09 08:17 PM
FIND SPECIFIC TEXT AND REPLACE IT Tree Excel Worksheet Functions 5 March 27th 08 12:27 AM
find specific text and make cell highlighted after the future Excel Discussion (Misc queries) 2 May 26th 06 02:11 PM
UDF code to find specific text in cell comments, then average cell values bruch04 Excel Programming 3 December 5th 05 10:01 PM
can you find specific text in a string ignoring any other text chriscp Excel Discussion (Misc queries) 1 September 18th 05 09:54 PM


All times are GMT +1. The time now is 04:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"