+ Reply to Thread
Results 1 to 4 of 4

Keep adding number until result cell is greater than reference

  1. #1
    Registered User
    Join Date
    02-10-2011
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Keep adding number until result cell is greater than reference

    Hi all!

    I'd really appreciate some help with a problem I have. My company has 20 or so construction workers, some of which have been with us for years. Their contracts are extended every 6, 3, or 1 month depending on our project needs.

    I'd like excel to calculate the next contract extension date based on the following criteria:
    Date of calculation - input in cell B2
    First contract date - date the employee signed first contract
    contract lenght - 1, 3 or 6 months

    I have tried using this formula:
    =IF(E4<=B2,DATE(YEAR(E4),MONTH(E4)+D4,DAY(E4)))
    but it only makes one iteration and calculates the first next contract date which is usually earlier than the one I need:
    Date of calculation = 31-Jan-2011
    First contract date = 14-Aug-2010
    Contract length = 3 month

    RESULT= 14-Nov-2010
    Is there any way to have excel keep adding the contract length until the "Next contract extension" (formula cell) is greater than the "Date of calculation" cell value?

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Cool Re: Keep adding number until result cell is greater than reference

    Try this code - I have A1 as the start date, A2 as todayd date and B11 as contract months
    Please Login or Register  to view this content.
    Just alter cell ref to suit your sheet.

    Hope it helps

  3. #3
    Registered User
    Join Date
    06-29-2010
    Location
    Central Texas
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Keep adding number until result cell is greater than reference

    Here is another option.
    Attached Files Attached Files
    Harley2

    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)

  4. #4
    Registered User
    Join Date
    02-10-2011
    Location
    Liverpool, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Keep adding number until result cell is greater than reference

    Thanks guys.

    BarryTSL, your suggested formula seems to be working great except when handling end of month and leap years.

    Please Login or Register  to view this content.
    I've managed to find a quick fix using the EDATE function and part of your formula.

    The final formula for the following parameters:
    Please Login or Register  to view this content.
    Once again, thank you guys very much.

    I'll mark this topic as solved as soon as I finish checking the data once more.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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