+ Reply to Thread
Results 1 to 6 of 6

Flag rows containing X in one column, then change value of flagged row in another column.

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

    Flag rows containing X in one column, then change value of flagged row in another column.

    Looking to do:

    1: First, detect row used as header title row (it varies from sheet to sheet, could be anywher between rows 1-10). It can be detected by searching for the text "Space ID". Whatever row that appears on should be treated as the header row for the rest of this script. The reason this will work is because "Space ID" is a constant header title in every workbook, and can be used as a reference point to find the row the rest of the header titles are in.

    2: Using the determined header title row from above, find the column titled: "Last Check".

    3: For every row in the "Last Check" column identified above that has a value of "Overdue", save that row as a variable to be used in step 5.

    4: Using the determined header title row from step 1, find the column titled: "Status".

    5: For every row flagged in step 3, change the value (on each row) under the column "Status" to "Over".

    6: IF no "Overdue" values were found/changed, then continue as normal.
    If ANY "Overdue" values were found/changed, then call sub (my message box sub), then continue as normal.
    Attached Files Attached Files
    Last edited by ks100; 12-20-2013 at 10:00 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Flag rows containing X in one column, then change value of flagged row in another colu

    Assuming that the "Status" column is to the right of the "Last Check" column, try:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Flag rows containing X in one column, then change value of flagged row in another colu

    I think the OP indicated that the Status column may not be 1 column to the right of the Last Check column. Try this:

    Please Login or Register  to view this content.
    Last edited by stnkynts; 12-20-2013 at 11:22 AM.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Flag rows containing X in one column, then change value of flagged row in another colu

    Thanks stnkynts ... you are perfectly correct. I should have read the post more carefully.

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

    Re: Flag rows containing X in one column, then change value of flagged row in another colu

    Obsolete post.
    Last edited by ks100; 12-20-2013 at 02:24 PM.

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

    Re: Flag rows containing X in one column, then change value of flagged row in another colu

    Quote Originally Posted by stnkynts View Post
    I think the OP indicated that the Status column may not be 1 column to the right of the Last Check column. Try this:

    Please Login or Register  to view this content.
    I can't seem to get that to work, however I am not getting an error either. Is it ok that the "Last Check" column is to the left of the "Status" column, and both columns are to the left of "Space ID"?

    If it helps, I wrote a script to automatically delete rows above the header, so if you are able to revise the script to operate while assuming the header row is row 1, that might be easiest.

+ 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: 2
    Last Post: 07-08-2013, 08:37 PM
  2. Hard? SUM the values of a column that matches a flag in an adjacent column
    By Nokao in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-07-2012, 11:29 AM
  3. Set flag if column has dup
    By carlysyme in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-27-2009, 05:02 AM
  4. Replies: 2
    Last Post: 02-18-2005, 10:06 AM
  5. Replies: 2
    Last Post: 02-18-2005, 10:06 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