+ Reply to Thread
Results 1 to 3 of 3

Search array

  1. #1
    Registered User
    Join Date
    08-30-2007
    Posts
    6

    Search array

    Does anyone know a smart way to find if a value exist within an array. Like the instr function but I want it to loop through values in an array.
    My array contains 10 articelnumbers and I want to check if an articelnumer (in a variable) is one of those 10 articelnumers in my array.

  2. #2
    Registered User
    Join Date
    08-30-2007
    Posts
    6

    I tried this way

    I tried to do this way, it seems to work but I donīt think the looks so good. Iīm sure there must be an easier way.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Your code is very good.

    Another idea is to use Collection array to search elements without scroll all the array, for example:
    Please Login or Register  to view this content.
    Regards.
    Antonio

+ 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