+ Reply to Thread
Results 1 to 6 of 6

Value in between Date Range

  1. #1
    Registered User
    Join Date
    01-29-2019
    Location
    Charlotte NC
    MS-Off Ver
    OFFICE 2016
    Posts
    3

    Post Value in between Date Range

    Need Assistance

    Start Date End Date First Day of Calendar Months and etc
    A1 B1 C1 D1 E1
    1/1/2019 5/24/2019 1/1/2019 2/1/2019 3/1/2019

    Today Date
    A2 B2
    1/29/2018 105.78


    I need help correcting this code if possible or how to write it better.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    What i a trying to say: If the Start Date begins on or After the first day of the Month in C1 Then give me B2 AND If the end date is in that current month than give me B2 as well. If not in the date range leave blank

    This is a contract with a start and end date. Need the Amortized amount 105.78 to go into the cell if the statement is true. This formula does not work if the start date begins on the Todays Date. It comes back with a blank status and i need it to populate 105.78
    Last edited by DrewC; 02-08-2019 at 05:42 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Value in between Date Range

    Normally I don't touch posts without a sample workbook attached because I am too lazy to set them up. This one was easy enough to set up. However, in the future, you will find people more willing to respond if a sample workbook is attached.

    The magic formula is: =IF(AND(A2>=EOMONTH(C1,-1)+1,A2<=EOMONTH(C1,0)),B2,"")

    Here is how I got there.

    We need to know the beginning and end of the month.

    The end of the month is =EOMONTH(C1,0) <- End of current month

    The beginning of the month =EOMONTH(C1,-1) + 1 <- End of previous month plus a day.

    Then it is a matter of determining if the date is between these two: >= Begin of month AND <= End of month.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    01-29-2019
    Location
    Charlotte NC
    MS-Off Ver
    OFFICE 2016
    Posts
    3

    Re: Value in between Date Range

    Attached is a sample.

    In the sample tab Feb should not populate because the Today's Date is not in Feb on Jan should populate.
    In addition to, in Feb when the date is in Feb, should also give you the amount in Jan and Feb and March is blank.
    Here is what i have tried
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,620

    Re: Value in between Date Range

    Try pasting the following in F2 and then dragging across to O2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    01-29-2019
    Location
    Charlotte NC
    MS-Off Ver
    OFFICE 2016
    Posts
    3

    Re: Value in between Date Range

    This is good but what if the start date doesn't begin until March. Therefore Jan and Feb should be blank and March once it arrives should only populate and continue with the formula. Example Attached
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,620

    Re: Value in between Date Range

    Paste the following into cell F2: =IF(OR($C2>EOMONTH(F1,0),$B$2< EOMONTH(F1,-1)+1,$D2< EOMONTH(F1,-1)+1),"",$E2)
    Let us know if you have any questions.

+ 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: 03-21-2018, 09:25 AM
  2. Check a date range and return value based on the date range
    By KeithCar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-13-2015, 12:55 PM
  3. Highlight a date range if today's date falls within that range
    By sdarnell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2014, 10:03 AM
  4. Search date range +/- 7 days and return date that falls within range
    By tlafferty in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-13-2013, 03:26 PM
  5. Replies: 9
    Last Post: 06-21-2012, 03:46 PM
  6. [SOLVED] Calculate how many days in one date range fall into a second date range
    By globalpontoon in forum Excel General
    Replies: 2
    Last Post: 05-08-2012, 03:02 PM
  7. Replies: 4
    Last Post: 03-18-2011, 07:02 AM

Tags for this Thread

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