+ Reply to Thread
Results 1 to 6 of 6

Return value, If a date falls between two dates - Need VBA code support

  1. #1
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Return value, If a date falls between two dates - Need VBA code support

    Dear forum experts,

    I am coming with a need of VBA code for if statement. I have a date in Column A and kept field for Start date (01-04-2020) and End date (30-10-2020). If Column A date falls between the mentioned date in Start and End date field, result to be returned as "Yes" in Column B orelse "No".

    The model excel data set has been attached for your kind reference and kindly do the needful.

    Regards
    Attached Files Attached Files

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,233

    Re: Return value, If a date falls between two dates - Need VBA code support

    Formula...
    Place formula in [B2] and copy down...
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    VBA
    Please Login or Register  to view this content.
    Last edited by sintek; 01-05-2021 at 03:09 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: Return value, If a date falls between two dates - Need VBA code support

    Quote Originally Posted by sintek View Post
    Formula...
    Place formula in [B2] and copy down...
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    VBA
    Please Login or Register  to view this content.
    Thanks for your time Mr. sintek... I have used other vba code for this.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,233

    Re: Return value, If a date falls between two dates - Need VBA code support

    I have used other vba code for this.
    So why post if you already have a solution...

    Perhaps you should post your solution so other too can learn...

  5. #5
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: Return value, If a date falls between two dates - Need VBA code support

    Please Login or Register  to view this content.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,233

    Re: Return value, If a date falls between two dates - Need VBA code support

    You do know that this one line does all that...
    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. If date falls between two dates then return true
    By Anarchus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-31-2017, 02:05 AM
  2. [SOLVED] VLOOKUP to Return Value if date falls between two dates
    By Cdubisms in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-23-2016, 12:38 PM
  3. VLOOKUP to return value if date falls between two dates
    By Cdubisms in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2016, 11:49 AM
  4. VLOOKUP to return value if date falls between two dates
    By Cdubisms in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-23-2016, 11:48 AM
  5. HELP: Return a value with a date that falls between two other dates
    By hionman in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-18-2014, 08:01 AM
  6. [SOLVED] Looking for formula to return a date that falls between 2 dates
    By cobo1981 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-13-2014, 01:12 PM
  7. [SOLVED] Return value in X if date in Y falls between two dates - Help!
    By nephilim3uk in forum Excel General
    Replies: 4
    Last Post: 07-08-2012, 10:13 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