+ Reply to Thread
Results 1 to 4 of 4

Find text in specific cell??

  1. #1
    Dewey
    Guest

    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. #2
    Jim Jackson
    Guest

    RE: 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. #3
    Dewey
    Guest

    Re: 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. #4
    Jim Jackson
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1