Results 1 to 3 of 3

Assigning Strings To An Array

Threaded View

CrazyFileMaker Assigning Strings To An Array 04-22-2009, 01:51 AM
DonkeyOte Re: Assigning Strings To An... 04-22-2009, 02:18 AM
CrazyFileMaker Re: Assigning Strings To An... 04-22-2009, 02:31 AM
  1. #1
    Registered User
    Join Date
    03-31-2009
    Location
    Auburn Alabama
    MS-Off Ver
    Microsoft Office Excel 2007 (Windows)
    Posts
    99

    Thumbs up Assigning Strings To An Array

    Hello,

    My question is about assigning strings to an array.

    The following code searches a cell for three strings (said, told, asked):
    If InStr(Cells(1,1).Value, "said") > 0 Or _
       InStr(Cells(1,1).Value, "told") > 0 Or _
       InStr(Cells(1,1).Value, "asked") > 0 Then
    That works fine and all. But I have a lot more than three strings to search for...

    So, my question is, is there a way to assign those three words to an array, so that each word is an element, and then check for the elements of the array in a string. My guess is it would look something like this:
    If InStr(Cells(1,1).Value, Verb(2)) > 0 Then
    Is something like that possible? How would I code that?

    I'm just looking to be efficient and save myself a lot of unnecessary typing.

    Thanks for any and all help!
    Last edited by CrazyFileMaker; 04-22-2009 at 02:36 AM.

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