+ Reply to Thread
Results 1 to 14 of 14

Need help with simple formula

  1. #1
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Need help with simple formula

    =IF(AND(E3=TODAY(),E3<=TODAY()+3),"True","False")
    returns true but only for today..I need for today + 3 days

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help with simple formula

    maybe: =IF(OR(E3=TODAY(),E3<=TODAY()+3),"True","False")

    E3 cannot be TODAY() and TODAY()+3 in the same time

  3. #3
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Need help with simple formula

    Got it.....instead of AND it should be OR
    =IF(OR(E3=TODAY(),E3<=TODAY()+3),"True","False")

  4. #4
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Need help with simple formula

    Thanks a lot.

  5. #5
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: Need help with simple formula

    You left out a greater than sign in the first section of the AND. This works for me:

    =IF(AND(E3>=TODAY(),E3<=TODAY()+3),"True","False")
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help with simple formula

    You are welcome

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Need help with simple formula

    You are right and this is better ...because any date before today returns false,
    it returned true otherwise

    Thanks.


    Quote Originally Posted by tuph View Post
    You left out a greater than sign in the first section of the AND. This works for me:

    =IF(AND(E3>=TODAY(),E3<=TODAY()+3),"True","False")

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help with simple formula

    Quote Originally Posted by mikehk View Post
    returns true but only for today..I need for today + 3 days
    so your description was not clear

  9. #9
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Need help with simple formula

    Quote Originally Posted by sandy666 View Post
    so your description was not clear
    Is it possible to show the cell as empty/blank if the specified period has lapsed?
    for example....today + 3 days will show true, else empty/blank cell
    (before today and after today+3 days)

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help with simple formula

    If E3 will contain function TODAY() not a hardcoded date you can't do that because today TODAY() tomorrow will be also TODAY()
    if E3 will be hardcoded date eg.04/10/2017 you can use formula from above: =IF(AND(E3>=TODAY(),E3<=TODAY()+3),TRUE,"")
    with TRUE and FALSE you don't need quotation marks because TRUE and FALSE are Boolean values treated as 1 or 0

    AND()
    OR()
    IF()
    Logical functions
    Last edited by sandy666; 10-04-2017 at 02:09 AM.

  11. #11
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: Need help with simple formula

    Quote Originally Posted by mikehk View Post
    Is it possible to show the cell as empty/blank if the specified period has lapsed?
    for example....today + 3 days will show true, else empty/blank cell
    (before today and after today+3 days)
    Instead of "false" just type "" (2 dittos). This will leave the result blank if the formula is not true.
    =IF(AND(E3>=TODAY(),E3<=TODAY()+3),"True","False")

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help with simple formula

    @tuph
    That is what I said a one post earlier

  13. #13
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: Need help with simple formula

    Got it...thanks a lot guys, highly appreciate your help.

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Need help with simple formula

    You are welcome

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)

    If you did it - ignore it.
    Thank you.

+ 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. Simple Formula When Input for Formula is null
    By ulala2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-25-2017, 10:27 AM
  2. Replies: 4
    Last Post: 12-07-2012, 11:49 AM
  3. if formula (probably simple)
    By lpratt in forum Excel General
    Replies: 5
    Last Post: 05-16-2012, 03:09 AM
  4. [SOLVED] simple formula
    By Biff in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 06:05 AM
  5. [SOLVED] Help with what should be a simple formula
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  6. Help with what should be a simple formula
    By B Millar via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. simple % formula
    By John in forum Excel General
    Replies: 1
    Last Post: 07-20-2005, 05:05 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