+ Reply to Thread
Results 1 to 4 of 4

How to stop formula/calculations based on a text entry

  1. #1
    Registered User
    Join Date
    12-14-2018
    Location
    Durham, England
    MS-Off Ver
    MS Office 16
    Posts
    25

    How to stop formula/calculations based on a text entry

    Hi,

    I have an issued with a spreadsheet I am currently working on that is based around staffing/manning lists.

    The premise is, that each employee that starts with the company is added to the sheet which trackers a variety of things including their length of service which is displayed as attached in the image)


    Then in cell CR there is a column titled "Leave Date".

    The issue I'm having is I need the columns DAYS / WEEKS / MONTHS / YEARS to stop calculating when a date is entered in the Leave Data column

    The current formula I have for these columns is as follows;

    Days: =DATEDIF(G2,F2,"D")
    Weeks: =DATEDIF(G2,F2,"D")/7
    Months: =DATEDIF(G2,F2,"M")
    Years = =DATEDIF(G2,F2,"Y")

    Any help is much appreciated.

    Regards

    James

    example.jpg

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,974

    Re: How to stop formula/calculations based on a text entry

    So something like this?

    =IF(LeaveData="",DATEDIF(G2,F2,"D"),"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-14-2018
    Location
    Durham, England
    MS-Off Ver
    MS Office 16
    Posts
    25

    Re: How to stop formula/calculations based on a text entry

    I don't think so.

    If I'm understanding right, this will just leave the columns blank if there is no leave date?

    What I need is for the calculations to continue until there is a leave date entered, which would then stop the calculations but leave the final "count" of each calculation.
    Last edited by AliGW; 12-17-2018 at 10:25 AM. Reason: Clutter removed - don't quote the post immediately before yours, please.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,974

    Re: How to stop formula/calculations based on a text entry

    OK, maybe this, then:

    =IF(CR2="",DATEDIF(G2,F2,"D"),DATEDIF(G2,CR2,"D"))

+ 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: 0
    Last Post: 12-22-2015, 08:24 PM
  2. [SOLVED] Use specific formula based on text entry Only 3 different choices
    By STxFarmer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-13-2015, 01:40 PM
  3. [SOLVED] Formula to stop more than one entry in column of cells
    By MrV4Victory in forum Excel General
    Replies: 12
    Last Post: 11-30-2013, 10:37 PM
  4. Stop previously calculated columns from updating based on new formula calculations
    By Northbaymac64 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-05-2013, 06:40 PM
  5. Replies: 0
    Last Post: 07-25-2012, 05:40 PM
  6. Stop formula calculations once conditions are met
    By waddsn1060 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2011, 09:38 PM
  7. Replies: 1
    Last Post: 11-29-2005, 02:00 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