+ Reply to Thread
Results 1 to 3 of 3

Assigning Strings To An Array

  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):
    Please Login or Register  to view this content.
    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:
    Please Login or Register  to view this content.
    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.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Assigning Strings To An Array

    Something like ?

    Please Login or Register  to view this content.
    It would of course make most sense to store these words in a range on a sheet... you could then perhaps also think about using Evaluate.

    There may well be other solutions (regex for ex.) ... the above is just one approach.

  3. #3
    Registered User
    Join Date
    03-31-2009
    Location
    Auburn Alabama
    MS-Off Ver
    Microsoft Office Excel 2007 (Windows)
    Posts
    99

    Re: Assigning Strings To An Array

    Thanks Donkey! You always provide me very helpful answers

+ 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