+ Reply to Thread
Results 1 to 2 of 2

IF x = this or x = that x = thisthat or x = thisthatthis (where or comes from array)

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    IF x = this or x = that x = thisthat or x = thisthatthis (where or comes from array)

    In a spreadsheet there are columns with names in the first row.

    Bob's column may include Jim, Jan and Tom, etc.


    Let's say Bob is in the B column... and Jim, Jan and Tom are in rows 2 through 4 respectively (Bob is in the first row as the header title).

    In this case, the script should go

    Please Login or Register  to view this content.

    I want it to check cell.value to see if it matches any of the names in Bob's column, to where I can just add a name to Bob's column directly on the spreadsheet by hand and it will automatically check that name when Bob's list is referenced.


    It will need to get a little more advanced than this as well... there is a userform with about ten textboxes on it. In each of the ten text boxes, the user can type a name (such as Bob) and when the process is ran, the script will check all ten boxes for names, and then check each name just like it did Bob's.

    So if

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    then the script would check cell.value for all the names on Bob's AND Harry's column, and perform (the same action) if any one of those names found a match.

    I basically want to make it to where you can enter up to 10 names at a time, and it will check cell.value for all the people under each name entered's column.

    Would I use an Array to do this? If so how does that work?
    Last edited by ks100; 09-25-2015 at 08:30 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: IF x = this or x = that x = thisthat or x = thisthatthis (where or comes from array)

    to check this
    I want it to check cell.value to see if it matches any of the names in Bob's column
    use
    Please Login or Register  to view this content.
    With a number of tests -> just run then in a loop.
    Best Regards,

    Kaper

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help with: Range Array SelectCase Loop delete: Array All Sheet.Names
    By dlow in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-08-2015, 07:11 PM
  2. [SOLVED] Populate one array from another array and print new array as a range
    By Kaden265 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2014, 07:52 AM
  3. Loop new messages containing a table, populate a dynamic array, paste array to Excel
    By laripa in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2013, 07:20 AM
  4. [SOLVED] Quick Array question - Copy array to another array then resize?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-02-2013, 01:17 AM
  5. [SOLVED] Populate Listbox with all rows of a dynamic array where elements of a single array match.
    By Tayque_J_Holmes in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-07-2012, 04:54 AM
  6. Replace hard coded array in formula with link to input array
    By David Brown in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2011, 07:45 AM

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