+ Reply to Thread
Results 1 to 2 of 2

If cell value = one of 3 possible words, then perform this task based on its row

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

    If cell value = one of 3 possible words, then perform this task based on its row

    In plain English I need to do the following:

    1. Scan each cell in the A column.

    2. For each cell that has the text ALPHA or BRAVO or CHARLIE, perform the following function:

    dim catname as string
    catname = B & the row number that (alpha, bravo or charlie) was found in.

    dim currentrow as string
    currentrow = (the row that alpha, bravo or charlie) was found in)

    Then, search the following range for a date at least 7 days from today: H(currentrow):AW(currentrow)

    For each cell found in this range with a date at least 7 days from today:

    dim currentcolumn as string
    currentcolumn = (the column of the date its currently stopped on)

    dim taskname as string
    taskname = the value of the cell in (currentcolumn) & row 4

    call makeappointment

    Then continue searching the H to AW range for that date criteria and performing the same task.

    When it gets to the end of the range, finding no other dates that are 7 days or more in the future, continue to step 3

    3. Continue scanning the A column for ALPHA, BRAVO, or CHARLIE repeating the above script each time if it finds one of those names.
    Last edited by ks100; 09-25-2014 at 03:15 PM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: If cell value = one of 3 possible words, then perform this task based on its row

    Untested try on a copy first.

    Please Login or Register  to view this content.

+ 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. Replies: 4
    Last Post: 11-30-2012, 03:14 PM
  2. Code to perform task based on data entered in userform
    By Staci in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2011, 02:06 PM
  3. Perform same task on all worksheets in workbook
    By markrennolds in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2010, 09:52 AM
  4. Perform one task at a time
    By tchristie33 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2007, 06:21 PM
  5. Perform Following Task
    By leo73pk in forum Excel General
    Replies: 1
    Last Post: 09-29-2006, 10:12 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