+ Reply to Thread
Results 1 to 4 of 4

Combining numeric and logical functions

  1. #1
    Registered User
    Join Date
    07-09-2014
    Location
    Springfield, missouri
    MS-Off Ver
    2013
    Posts
    25

    Combining numeric and logical functions

    I have to calculate an expiration date in days and compare it to the current date. If the calculated days
    is 0 or negative, I want to return a value of "Expired", otherwise I want it to return the actual days remaining.

    I only know how to do this by adding a separate column. Is there a formula I can use to accomplish this without
    having to add a second column for the logical function? I have attached a sample spreadsheet. Thanks.

    DATE EXPIRATION DATE DAYS UNTIL EXPIRE STATUS
    3/30/2015 3/29/2016 -1,513 EXPIRED
    6/20/2019 6/19/2020 30
    =A2+365 =B2-TODAY() =IF((C3<=0),"EXPIRED","")

    If Days until Expire is 0 or negative, return "Expired", otherwise, return calculated days. Eliminate STATUS Column.
    Attached Files Attached Files
    Last edited by dprobst; 05-20-2020 at 11:01 AM.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.101.3 (25100321))
    Posts
    9,313

    Re: Combining numeric and logical functions

    =b2-today() =if((c3<=0),"expired","")

    =if((b2-today() < = 0),"expired",b2-today())
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    07-09-2014
    Location
    Springfield, missouri
    MS-Off Ver
    2013
    Posts
    25

    Re: Combining numeric and logical functions

    This works perfectly. Thank you so much!

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.101.3 (25100321))
    Posts
    9,313

    Re: Combining numeric and logical functions

    you are welcome

+ 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. using logical functions
    By bennadelaidefringe in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-19-2015, 10:09 PM
  2. Combining Multiple if statements using logical operators
    By arahant16 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-24-2014, 03:49 AM
  3. [SOLVED] Logical , functions , on ( IF , AND , OR)
    By The Learner in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-20-2012, 04:30 AM
  4. Logical Functions
    By be165 in forum Excel General
    Replies: 3
    Last Post: 09-09-2009, 04:08 AM
  5. [SOLVED] using logical functions
    By civilized_engr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-10-2006, 02:40 PM
  6. numeric calculation in logical formula
    By Chris Vermaak in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2005, 07:05 AM
  7. [SOLVED] logical functions
    By wiz546 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-01-2005, 12:06 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