+ Reply to Thread
Results 1 to 3 of 3

VBA to place text label resulting from condition.

  1. #1
    Registered User
    Join Date
    07-26-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010, 2013
    Posts
    21

    VBA to place text label resulting from condition.

    In the attached example, I would like to have VBA code that automatically runs on cell value changes in the "End" column of the "Date Ranges" area to place a text label or "Flag" column beginning with cell E10. This "flag" (D/F) should be the result of the date (column C) falling between (to include start and end dates) of any of the date ranges input in the "Date Ranges" area.

    Please ignore "Test Flag 1.xlsx" as I've added Before and After tabs to the "Test Flag 2.xlsx" file to make the desired results more apparent.

    Thank you in advance for any assistance you are able to provide!
    Attached Files Attached Files
    Last edited by ericv101; 11-23-2014 at 08:39 PM. Reason: Attachment modification

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA to place text label resulting from condition.

    Hi ericv101,
    maybe this (in 'E10' cell)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-26-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010, 2013
    Posts
    21

    Re: VBA to place text label resulting from condition.

    Hi Nilem -

    The formula you've provided works beautifully within the spreadsheet I attached. I should have been more clear about the number date ranges as there could be many individual start / end date pairs. I believe it will require a looping function but that is a bit beyond my ability at the moment. Thanks again for you help!

    -Ericv101

+ 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] Is there a way to round this condition to 1 decimal place?
    By brians34 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-19-2013, 10:44 AM
  2. [SOLVED] Returns the header label if the condition is met
    By lemuel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-12-2013, 01:40 PM
  3. [SOLVED] Need code to add values from 2 text boxes and place result in a label.
    By egavasrg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2012, 08:12 PM
  4. Replies: 9
    Last Post: 08-21-2012, 03:57 PM
  5. [SOLVED] How can I place a condition on a list?
    By Cindy in forum Excel General
    Replies: 1
    Last Post: 08-05-2005, 05:05 PM

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